Package org.springframework.util
Class FileSystemUtils
- java.lang.Object
- org.springframework.util.FileSystemUtils
public abstract class FileSystemUtils extends Object
Utility methods for working with the file system.- Since:
- 2.5.3
- Author:
- Rob Harrop, Juergen Hoeller
Constructor Summary
Constructors Constructor Description FileSystemUtils()
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
copyRecursively(File src, File dest)
Recursively copy the contents of thesrc
file/directory to thedest
file/directory.static boolean
deleteRecursively(File root)
Delete the suppliedFile
- for directories, recursively delete any nested directories or files as well.
Constructor Detail
FileSystemUtils
public FileSystemUtils()
Method Detail
deleteRecursively
public static boolean deleteRecursively(File root)
Delete the suppliedFile
- for directories, recursively delete any nested directories or files as well.- Parameters:
root
- the rootFile
to delete- Returns:
true
if theFile
was deleted, otherwisefalse
copyRecursively
public static void copyRecursively(File src, File dest) throws IOException
Recursively copy the contents of thesrc
file/directory to thedest
file/directory.- Parameters:
src
- the source directorydest
- the destination directory- Throws:
IOException
- in the case of I/O errors