- java.lang.Object
-
- com.pervasive.datarush.io.UnixStyleGlobbing
-
public class UnixStyleGlobbing extends Object
Provides UNIX-style globbing over paths. This class is intended for use in implementing file systems. Globbing is performed by breadth-first recursive decent over the file system, applying an appropriate filter at each level.A limited form of UNIX file globbing is supported. The standard wildcards '*' and '?' may be used, as may character sets (delimited by '[' and ']'). Alternations -
{a,b,c}
for example - are supported, but alternatives may not span directories. That is,{a/b,c}
is not valid.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
UnixStyleGlobbing.GlobDefinition
Provides information for performing globbing.
-
Constructor Summary
Constructors Constructor Description UnixStyleGlobbing(FileSystem fs, UnixStyleGlobbing.GlobDefinition glob)
Constructs a globber for the specified file system using the defined globbing.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<PathDetails>
findMatches()
Returns paths that match defined glob pattern.
-
-
-
Constructor Detail
-
UnixStyleGlobbing
public UnixStyleGlobbing(FileSystem fs, UnixStyleGlobbing.GlobDefinition glob)
Constructs a globber for the specified file system using the defined globbing.- Parameters:
fs
- the file system to which globbing is appliedglob
- the matching pattern to use
-
-
Method Detail
-
findMatches
public List<PathDetails> findMatches() throws IOException
Returns paths that match defined glob pattern.- Throws:
IOException
- thrown if an I/O error occurs accessing paths
-
-