@Override public FileObject move(FileLock lock, FileObject target, String name, String ext) throws IOException { return fileObj.move(lock, target, name, ext); }
/** Moves file to the selected folder. * This implementation uses a copy-and-delete mechanism, and automatically uses the necessary lock. * @param source source file object * @param destFolder destination folder * @param newName file name (without extension) of destination file * @return new file object * @exception IOException if either the {@link #copyFile copy} or {@link FileObject#delete delete} failed */ public static FileObject moveFile(FileObject source, FileObject destFolder, String newName) throws IOException { FileLock lock = null; try { lock = source.lock(); return source.move(lock, destFolder, newName, source.getExt()); } finally { if (lock != null) { lock.releaseLock(); } } }
updateFoldersLock(getParent()); FileObject ret = leader.move(l, target, name, ext); FileObjectLkp.reassign(this, ret); return ret;
public FileObject move(FileLock lock,FileObject target,String name,String ext) throws IOException { return fileObj.move(lock, target, name, ext); }
public FileObject move(FileLock lock,FileObject target,String name,String ext) throws IOException { return fileObj.move(lock, target, name, ext); }
/** Moves file to the selected folder. * This implementation uses a copy-and-delete mechanism, and automatically uses the necessary lock. * @param source source file object * @param destFolder destination folder * @param newName file name (without extension) of destination file * @return new file object * @exception IOException if either the {@link #copyFile copy} or {@link FileObject#delete delete} failed */ public static FileObject moveFile(FileObject source, FileObject destFolder, String newName) throws IOException { FileLock lock = null; try { lock = source.lock(); return source.move (lock, destFolder, newName, source.getExt ()); } finally { if (lock != null) lock.releaseLock(); } }
/** Moves file to the selected folder. * This implementation uses a copy-and-delete mechanism, and automatically uses the necessary lock. * @param source source file object * @param destFolder destination folder * @param newName file name (without extension) of destination file * @return new file object * @exception IOException if either the {@link #copyFile copy} or {@link FileObject#delete delete} failed */ public static FileObject moveFile(FileObject source, FileObject destFolder, String newName) throws IOException { FileLock lock = null; try { lock = source.lock(); return source.move (lock, destFolder, newName, source.getExt ()); } finally { if (lock != null) lock.releaseLock(); } }
foTmp.move(lock, foPrjDir, "nbactions", "xml"); } catch (IOException ex) { Exceptions.printStackTrace(ex);
public FileObject move (FileObject f, String suffix) throws IOException { boolean locked = isLocked (); FileObject fo = getFile(); FileLock lock = takeLock (); try { String newName = fo.getName() + suffix; FileObject dest = fo.move (lock, f, newName, fo.getExt ()); return dest; } finally { if (!locked) lock.releaseLock (); } }
child = name.substring(dot + 1); d.move(lock, p, child, null); } finally { lock.releaseLock();
target = projectDirectory.move(lock, newTarget, nueFolderName, null); } finally { lock.releaseLock();
return leader.move (l, target, name, ext); } finally { fs.finishAtomicAction ();
final FileLock lock = itemFO.lock(); try { FileObject movedFileFO = itemFO.move(lock, toFolderFO, newName, ""); // NOI18N Folder movedFolder = toFolder.findFolderByName(movedFileFO.getNameExt()); if (toFolder.getProject() == fromFolder.getProject()) {
return leader.move (l, target, name, ext); } finally { fs.finishAtomicAction ();