public abstract class

FileSystemUtils

extends Object
java.lang.Object
   ↳ org.springframework.util.FileSystemUtils

Class Overview

Utility methods for working with the file system.

Summary

Public Constructors
FileSystemUtils()
Public Methods
static void copyRecursively(File src, File dest)
Recursively copy the contents of the src file/directory to the dest file/directory.
static boolean deleteRecursively(File root)
Delete the supplied File - for directories, recursively delete any nested directories or files as well.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public FileSystemUtils ()

Also: SpringCore

Public Methods

public static void copyRecursively (File src, File dest)

Also: SpringCore

Recursively copy the contents of the src file/directory to the dest file/directory.

Parameters
src the source directory
dest the destination directory
Throws
IOException in the case of I/O errors

public static boolean deleteRecursively (File root)

Also: SpringCore

Delete the supplied File - for directories, recursively delete any nested directories or files as well.

Parameters
root the root File to delete
Returns
  • true if the File was deleted, otherwise false