Class GlobFileFinder

java.lang.Object
org.yamcs.utils.GlobFileFinder

public class GlobFileFinder extends Object
Finds a list of files according to a glob pattern.

Not thread safe!

  • Constructor Details

    • GlobFileFinder

      public GlobFileFinder()
  • Method Details

    • find

      public List<Path> find(String pattern)
      Calls find(Path, String) for the current working directory.
    • find

      public List<Path> find(Path start, String pattern)
      Find a list of regular files (not directories) which match glob pattern.

      The pattern can contain { }, *, ?, [ ].

      ** for recursive directory matching is not supported.

      The find will limit the number of operations in order to avoid too much I/O due to a pattern requiring lot of I/O operations. An I/O operation is roughly file stat.

      Parameters:
      pattern - glob pattern
      Returns:
      Matched files
    • setIoLimit

      public void setIoLimit(int ioLimit)
      Set the maximum number of IO operations performed when matching a pattern.
      Parameters:
      ioLimit -