@Test public void testCreateEmptyFile() { final File file = new File(TEST_DIRECTORY + File.separator + "test.txt"); Assert.assertFalse(file.exists()); try { FileHelper.createEmptyFile(file); Assert.assertTrue(file.exists()); FileHelper.createEmptyFile(file); Assert.assertTrue(file.exists()); } catch (final IOException e) { Assert.fail(e.getMessage()); } }
public static void createEmptyFile(final File file) throws IOException { if (!file.exists()) { file.createNewFile(); } }
FileHelper { public static void createEmptyFile(final File file) throws IOException { if (!file.exists()) { file.createNewFile(); } } }
FileHelper { public static void createEmptyFile(final File file) throws IOException { if (!file.exists()) { file.createNewFile(); } } private  FileHelper(); }
FileHelper { public static void createEmptyFile(final File file) throws IOException { if (!file.exists()) { file.createNewFile(); } } private  FileHelper(); static void createEmptyFile(final File file); static int folderSize(File directory, boolean recursive); static void doCopyFile(final File srcFile, final File destFile); static void forceDelete(final File file); static void forceMkdir(final File directory); static void moveDirectory(final File srcDir, final File destDir); static String[] parseContentFile(final File contentFile); static void writeStringToFile(final File file, final String data,
			final Charset encoding, final boolean append); static boolean unzipFile(String zipname, String destDir); static int getFileSizeInMb(File downloadedFile); static int getCountFiles(File fileToCheck); }
FileHelper { public static void createEmptyFile(final File file) throws IOException { if (!file.exists()) { file.createNewFile(); } } private  FileHelper(); static void createEmptyFile(final File file); static int folderSize(File directory, boolean recursive); static void doCopyFile(final File srcFile, final File destFile); static void forceDelete(final File file); static void forceMkdir(final File directory); static void moveDirectory(final File srcDir, final File destDir); static String[] parseContentFile(final File contentFile); static void writeStringToFile(final File file, final String data,
			final Charset encoding, final boolean append); static boolean unzipFile(String zipname, String destDir); static int getFileSizeInMb(File downloadedFile); static int getCountFiles(File fileToCheck); static final long ONE_KB; static final long ONE_MB; }