Class FileUtils
java.lang.Object
org.springframework.boot.loader.tools.FileUtils
Utilities for manipulating files and directories in Spring Boot tooling.
- Since:
- 1.0.0
- Author:
- Dave Syer, Phillip Webb
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic booleanisSignedJarFile(File file) Returnstrueif the given jar file has been signed.static voidremoveDuplicatesFromOutputDirectory(File outputDirectory, File originDirectory) Utility to remove duplicate files from an "output" directory if they already exist in an "origin".static StringGenerate a SHA-1 Hash for a given file.
- 
Constructor Details- 
FileUtilspublic FileUtils()
 
- 
- 
Method Details- 
removeDuplicatesFromOutputDirectoryUtility 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.- Parameters:
- outputDirectory- the output directory
- originDirectory- the origin directory
 
- 
sha1HashGenerate a SHA-1 Hash for a given file.- Parameters:
- file- the file to hash
- Returns:
- the hash value as a String
- Throws:
- IOException- if the file cannot be read
 
- 
isSignedJarFileReturnstrueif the given jar file has been signed.- Parameters:
- file- the file to check
- Returns:
- if the file has been signed
- Throws:
- IOException- on IO error
 
 
-