Class IOUtils


  • public final class IOUtils
    extends Object
    • Method Detail

      • walkDirectory

        @SafeVarargs
        @Nullable
        public static @Nullable List<Path> walkDirectory​(Path location,
                                                         boolean recursive,
                                                         Predicate<Path>... filters)
                                                  throws IOException
        Walk directory with filters
        Parameters:
        location - Target location
        filters - Custom search filter
        recursive - Determine if walk is recursive or not
        Returns:
        Return a lis with all filter elements
        Throws:
        IOException - if an I/O error is thrown when accessing the starting file.
      • getExtension

        @Nullable
        public static @Nullable String getExtension​(Path location)
        Get file extensions from path
        Parameters:
        location - Target location
        Returns:
        Return an extension file without dot or null if is not a valid file.