Package org.yamcs.utils
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 Summary
Constructors Constructor Description GlobFileFinder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Path>
find(String pattern)
Find a list of regular files (not directories) which match glob pattern.void
setIoLimit(int ioLimit)
Set the maximum number of IO operations performed when matching a pattern.
-
-
-
Method Detail
-
find
public List<Path> find(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. A IO operation is roughly file stat.
- Parameters:
pattern
-- Returns:
-
setIoLimit
public void setIoLimit(int ioLimit)
Set the maximum number of IO operations performed when matching a pattern.- Parameters:
ioLimit
-
-
-