类 FileSystemUtils
- java.lang.Object
- org.springframework.util.FileSystemUtils
public abstract class FileSystemUtils extends Object
Utility methods for working with the file system.- 从以下版本开始:
- 2.5.3
- 作者:
- Rob Harrop, Juergen Hoeller
构造器概要
构造器 构造器 说明 FileSystemUtils()
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 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.
构造器详细资料
FileSystemUtils
public FileSystemUtils()
方法详细资料
deleteRecursively
public static boolean deleteRecursively(File root)
Delete the suppliedFile
- for directories, recursively delete any nested directories or files as well.- 参数:
root
- the rootFile
to delete- 返回:
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.- 参数:
src
- the source directorydest
- the destination directory- 抛出:
IOException
- in the case of I/O errors