类 FileUtils


  • public abstract class FileUtils
    extends Object
    Utilities for manipulating files and directories in Spring Boot tooling.
    • 构造器详细资料

    • 方法详细资料

      • removeDuplicatesFromOutputDirectory

        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.
        参数:
        outputDirectory - the output directory
        originDirectory - the origin directory
      • sha1Hash

        public static String sha1Hash​(File file)
                               throws IOException
        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