Package bm.util

Class FindFiles

java.lang.Object
bm.util.FindFiles

public class FindFiles extends Object
Methods to recursively collect files.
  • Constructor Details

    • FindFiles

      public FindFiles()
  • Method Details

    • glob

      public static List<Path> glob(String glob) throws IOException
      Finds recursively all accessible files determined by the glob pattern which should fit the description of PathMatcher. There are corner cases where this does not find a path which formally matches, because recursing into subdirectories requires that a path prefix of the pattern matches the directory.

      For example the pattern /etc/udev**.d can not find /etc/udev/hwdb.d because no path prefix of the pattern, /etc is the only one anyway, matches /etc/udev. To get a close similar pattern, use /etc/udev**/*.d.

      Files or directories which produce IO errors on access are silently ignored.

      Parameters:
      glob - is the pattern to expand.
      Returns:
      the list of matching paths
      Throws:
      IOException