X-Git-Url: http://www2.svjatoslav.eu/gitweb/?p=svjatoslav_commons.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Feu%2Fsvjatoslav%2Fcommons%2Ffile%2FIOHelper.java;h=e7ee659e8b729acb282fe14821e79691487c7176;hp=46abaa5d63c54ccab4a833ed95ffe87a6fd0dfaf;hb=846af2def5b489670668b978e4ea703c8dfb22b6;hpb=2be5dfa0314f834b3a5b759e204f2716f87df744 diff --git a/src/main/java/eu/svjatoslav/commons/file/IOHelper.java b/src/main/java/eu/svjatoslav/commons/file/IOHelper.java index 46abaa5..e7ee659 100755 --- a/src/main/java/eu/svjatoslav/commons/file/IOHelper.java +++ b/src/main/java/eu/svjatoslav/commons/file/IOHelper.java @@ -20,6 +20,12 @@ public class IOHelper { /** * Deletes files and directories recursively. WARNING!!! Follows symlinks!!! + * + * @param file + * directory to delete with entire contents. + * + * @throws IOException + * if filesystem error happens */ public static void deleteRecursively(final File file) throws IOException { if (file.isDirectory()) { @@ -64,7 +70,16 @@ public class IOHelper { * then leaves file as-is. If content differs, then overrides file with the * new content. * + * @param file + * file to potentially overwrite + * @param newContent + * new content * @return true if file was overwritten. + * + * @throws FileNotFoundException + * if file is not found. + * @throws IOException + * if error happens during file IO. */ public static boolean overwriteFileIfContentDiffers(final File file, final byte[] newContent) throws FileNotFoundException, IOException {