类 FileUtils
java.lang.Object
org.springframework.boot.loader.tools.FileUtils
Utilities for manipulating files and directories in Spring Boot tooling.
- 从以下版本开始:
- 1.0.0
- 作者:
- Dave Syer, Phillip Webb
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static boolean
isSignedJarFile
(File file) Returnstrue
if the given jar file has been signed.static void
removeDuplicatesFromOutputDirectory
(File outputDirectory, File originDirectory) Utility to remove duplicate files from an "output" directory if they already exist in an "origin".static String
Generate a SHA-1 Hash for a given file.
-
构造器详细资料
-
FileUtils
public FileUtils()
-
-
方法详细资料
-
removeDuplicatesFromOutputDirectory
Utility to remove duplicate files from an "output" directory if they already exist in an "origin". Recursively scans the origin directory looking for files (not directories) that exist in both places and deleting the copy.- 参数:
outputDirectory
- the output directoryoriginDirectory
- the origin directory
-
sha1Hash
Generate a SHA-1 Hash for a given file.- 参数:
file
- the file to hash- 返回:
- the hash value as a String
- 抛出:
IOException
- if the file cannot be read
-
isSignedJarFile
Returnstrue
if the given jar file has been signed.- 参数:
file
- the file to check- 返回:
- if the file has been signed
- 抛出:
IOException
- on IO error
-