@Test public void moveNonExistentFile() throws IOException { File ghostFile = new File(mTestFolder.getRoot(), "ghost.txt"); File toFile = mTestFolder.newFile("to.txt"); mException.expect(IOException.class); FileUtils.move(ghostFile.getAbsolutePath(), toFile.getAbsolutePath()); fail("moving a non-existent file should have failed"); }
public static void move(String srcPath, String dstPath) throws IOException { Files.move(Paths.get(srcPath), Paths.get(dstPath), StandardCopyOption.REPLACE_EXISTING); }
FileUtils { public static void move(String srcPath, String dstPath) throws IOException { Files.move(Paths.get(srcPath), Paths.get(dstPath), StandardCopyOption.REPLACE_EXISTING); } }
FileUtils { public static void move(String srcPath, String dstPath) throws IOException { Files.move(Paths.get(srcPath), Paths.get(dstPath), StandardCopyOption.REPLACE_EXISTING); } private  FileUtils(); }
FileUtils { public static void move(String srcPath, String dstPath) throws IOException { Files.move(Paths.get(srcPath), Paths.get(dstPath), StandardCopyOption.REPLACE_EXISTING); } private  FileUtils(); static void changeLocalFileGroup(String path, String group); static void changeLocalFilePermission(String filePath, String perms); static void changeLocalFileToFullPermission(String filePath); static String getLocalFileOwner(String filePath); static String getLocalFileGroup(String filePath); static short getLocalFileMode(String filePath); static short translatePosixPermissionToMode(Set<PosixFilePermission> permission); static void changeLocalFileUser(String path, String user); static void setLocalDirStickyBit(String dir); static void createBlockPath(String path, String workerDataFolderPermissions); static void move(String srcPath, String dstPath); static void delete(String path); static void deletePathRecursively(String path); static boolean createStorageDirPath(String path, String workerDataFolderPermissions); static void createFile(String filePath); static void createDir(String path); static boolean exists(String path); static boolean isStorageDirAccessible(String path); }
FileUtils { public static void move(String srcPath, String dstPath) throws IOException { Files.move(Paths.get(srcPath), Paths.get(dstPath), StandardCopyOption.REPLACE_EXISTING); } private  FileUtils(); static void changeLocalFileGroup(String path, String group); static void changeLocalFilePermission(String filePath, String perms); static void changeLocalFileToFullPermission(String filePath); static String getLocalFileOwner(String filePath); static String getLocalFileGroup(String filePath); static short getLocalFileMode(String filePath); static short translatePosixPermissionToMode(Set<PosixFilePermission> permission); static void changeLocalFileUser(String path, String user); static void setLocalDirStickyBit(String dir); static void createBlockPath(String path, String workerDataFolderPermissions); static void move(String srcPath, String dstPath); static void delete(String path); static void deletePathRecursively(String path); static boolean createStorageDirPath(String path, String workerDataFolderPermissions); static void createFile(String filePath); static void createDir(String path); static boolean exists(String path); static boolean isStorageDirAccessible(String path);  }