/** * Renames the srcPath to the dstPath. * * @param srcPath The path of the source file / folder. * @param dstPath The path of the destination file / folder. * @return true if succeed, false otherwise * @throws IOException if the operation fails */ public synchronized boolean rename(TachyonURI srcPath, TachyonURI dstPath) throws IOException { return rename(-1, srcPath, dstPath); }
/** * Renames the file. * * @param fileId the file id * @param dstPath the new path of the file in the file system. * @return true if succeed, false otherwise * @throws IOException if the operation fails */ public synchronized boolean rename(long fileId, TachyonURI dstPath) throws IOException { return rename(fileId, TachyonURI.EMPTY_URI, dstPath); }