Class FileUtils

java.lang.Object
org.springframework.boot.loader.tools.FileUtils

public abstract class FileUtils extends Object
Utilities for manipulating files and directories in Spring Boot tooling.
Since:
1.0.0
Author:
Dave Syer, Phillip Webb
  • Constructor Details Link icon

    • FileUtils Link icon

      public FileUtils()
  • Method Details Link icon

    • removeDuplicatesFromOutputDirectory Link icon

      public static void removeDuplicatesFromOutputDirectory(File outputDirectory, File originDirectory)
      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.
      Parameters:
      outputDirectory - the output directory
      originDirectory - the origin directory
    • isSignedJarFile Link icon

      public static boolean isSignedJarFile(@Nullable File file) throws IOException
      Returns true if 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