Class FileUtils


  • public class FileUtils
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean copyDir​(java.io.File sourceDir, java.io.File targetDir)  
      static void deleteDirectory​(java.io.File folder)  
      static void deleteDirectoryAndEmptyParent​(java.io.File folder)  
      static long getDirSize​(java.lang.String path)
      Calculate the directory size including sub dir.
      static void recursiveDeleteFolder​(java.lang.String path)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • deleteDirectory

        public static void deleteDirectory​(java.io.File folder)
      • deleteDirectoryAndEmptyParent

        public static void deleteDirectoryAndEmptyParent​(java.io.File folder)
      • copyDir

        public static boolean copyDir​(java.io.File sourceDir,
                                      java.io.File targetDir)
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • getDirSize

        public static long getDirSize​(java.lang.String path)
        Calculate the directory size including sub dir.
        Parameters:
        path -
        Returns:
      • recursiveDeleteFolder

        public static void recursiveDeleteFolder​(java.lang.String path)
                                          throws java.io.IOException
        Throws:
        java.io.IOException