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

FileSet Class

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

Set of inclusion and exclusion patterns. It doesn't depend on the order how the inclusion and exclusion patterns are added into the FileSet.

Syntax
public class FileSet
Inheritance
Object
FileSet
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()

Constructors

Name Description
FileSet()

Initializes a new instance of the FileSet class.

FileSet(Char[])

Initializes a new instance of the FileSet class.

FileSet(String)

Initializes a new instance of the FileSet class.

FileSet(String, Char[])

Initializes a new instance of the FileSet class.

FileSet(String, String)

Initializes the FileSet object.

FileSet(String, String, TraversalMode)

Initializes the FileSet object.

Properties

Name Description
BasePath

Gets or sets the base path of the set.

ContainingDirectoriesIncluded

Gets or sets a value indicating whether a consumer of the FileSet should also include directories where the files are located. Also used in the GetLocalItems() method. Example: Ftp.GetItems("DIR/*.txt") - this property determines whether item "DIR" should be also included in output collection.

EmptyDirectoriesIncluded

Gets or sets a value indicating whether a consumer of the FileSet should include empty directories or not. Also used in the GetLocalItems() method.

Flatten

Gets or sets a value indicating whether a consumer of the FileSet should flatten the output. Flatten means to don't persist directory structure. For example if used to upload files "A/a.txt" and "B/b.txt" to the "/data" directory on a FTP server, files "a.txt" and "b.txt" are uploaded directly into the "/data" directory (directories "A" and "B" are not created in the "/data" directory).

IsCaseSensitive

Gets or sets a value indicating whether the FileSet is case sensitive.

Methods

Name Description
Exclude(String)

Adds a path or mask into collection of exclusion patterns. The supported wildcards are '?' and '*' and '**'. For detailed specification with examples see the documentation.

Exclude(String, TraversalMode)

Adds a path or mask into collection of exclusion patterns. The supported wildcards are '?' and '*' and '**'. For detailed specification with examples see the documentation.

GetLocalItems()

Gets a collection of local file system items (files and directories) which matches this FileSet. Only items which matches no exclusion pattern and matches at leas one inclusion pattern are included into result collection. It doesn't depend on the order how the inclusion and exclusion patterns were added into the FileSet.
If you don't want to include empty directories into result collection, please set the EmptyDirectoriesIncluded to false.

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.

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.

IsMatch(String, FileSetMatchMode)

Returns a value indicating whether the specified relative path matches the FileSet. This method is intended to be overwritten by descendants. In this case please note that for optimization issues when called with parameters equal to "." and TraverseDirectory this method should return false if no inclusion pattern was specified; true otherwise.

In This Article
  • Constructors
  • Properties
  • Methods
© REBEX ČR s.r.o. Back to top
Privacy policy
Manage cookies