类 FileSystemUtils


  • public abstract class FileSystemUtils
    extends Object
    Utility methods for working with the file system.
    从以下版本开始:
    2.5.3
    作者:
    Rob Harrop, Juergen Hoeller
    • 方法详细资料

      • deleteRecursively

        public static boolean deleteRecursively​(File root)
        Delete the supplied File - for directories, recursively delete any nested directories or files as well.
        参数:
        root - the root File to delete
        返回:
        true if the File was deleted, otherwise false
      • copyRecursively

        public static void copyRecursively​(File src,
                                           File dest)
                                    throws IOException
        Recursively copy the contents of the src file/directory to the dest file/directory.
        参数:
        src - the source directory
        dest - the destination directory
        抛出:
        IOException - in the case of I/O errors