FileSet.Include Method
Namespace: Rebex.IO
Assembly: Rebex.Common.dll (version 7.0.9083)
Include(String)
Adds a path or mask into collection of inclusion patterns. The supported wildcards are '?' and '*' and '**'. For detailed specification with examples see the documentation.
Declaration
public void Include(string pattern)
Parameters
Type | Name | Description |
---|---|---|
String | pattern | A path or mask (relative to the base path) which define an inclusion pattern. |
Include(String, TraversalMode)
Adds a path or mask into collection of inclusion patterns. The supported wildcards are '?' and '*' and '**'. For detailed specification with examples see the documentation.
Declaration
public virtual void Include(string pattern, TraversalMode mode)
Parameters
Type | Name | Description |
---|---|---|
String | pattern | A path or mask (relative to the base path) which define an inclusion pattern. |
TraversalMode | mode | Specifies traversal mode of directories for the |
Remarks
'?' matches any single character.
'' matches any number of any characters except the directory separators.
'**' matches any number of any characters (directory separators can be reduced e.g. "a*\b" is equivalent to "a**\b" which matches "a\x\y\z\b" and also "a\b" but not "ab").
Examples
data\file-???.txt | Matches files within the "data" directory e.g. "data\file-007.txt", but not "data\file-7.txt". |
data\*.txt | Matches any ".txt" file within the "data" directory (only within the "data" directory, not in subdirectories) e.g. "data\file.txt", but not "data\a\b\c\file.txt". |
data\**\*.txt | Matches any ".txt" file anywhere within the "data" directory and its subdirectories e.g. "data\file.txt" and also "data\a\b\c\file.txt". |