Package org.yamcs.utils
Class GlobFileFinder
java.lang.Object
org.yamcs.utils.GlobFileFinder
Finds a list of files according to a glob pattern.
Not thread safe!
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionCallsfind(Path, String)
for the current working directory.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.
-
Constructor Details
-
GlobFileFinder
public GlobFileFinder()
-
-
Method Details
-
find
Callsfind(Path, String)
for the current working directory. -
find
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
-
-