Rebex
Products Downloads Buy Support Contact
Show / Hide Table of Contents

FileSet.Include Method

Namespace: Rebex.IO
Assembly: Rebex.Common.dll (version 7.0.9147)

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 pattern.

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-???.txtMatches files within the "data" directory e.g. "data\file-007.txt", but not "data\file-7.txt".
data\*.txtMatches 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\**\*.txtMatches any ".txt" file anywhere within the "data" directory and its subdirectories e.g. "data\file.txt" and also "data\a\b\c\file.txt".
In This Article
  • Include(String)
  • Include(String, TraversalMode)
© REBEX ČR s.r.o. Back to top
Privacy policy
Manage cookies