Xceed .NET Libraries Documentation
GetFiles(Boolean,Object[]) Method


Xceed.FileSystem Assembly > Xceed.FileSystem Namespace > AbstractFolder Class > GetFiles Method : GetFiles(Boolean,Object[]) Method
true if files contained in the subfolders should be returned; false if only files that are immediate children of the folder should be returned.
An array of objects that can be used to filter the list of files returned.
Returns a filtered list of files contained in the folder.
Syntax
'Declaration
 
Public Overloads Function GetFiles( _
   ByVal recursive As Boolean, _
   ByVal ParamArray filters() As Object _
) As AbstractFile()
'Usage
 
Dim instance As AbstractFolder
Dim recursive As Boolean
Dim filters() As Object
Dim value() As AbstractFile
 
value = instance.GetFiles(recursive, filters)
public AbstractFile[] GetFiles( 
   bool recursive,
   params object[] filters
)

Parameters

recursive
true if files contained in the subfolders should be returned; false if only files that are immediate children of the folder should be returned.
filters
An array of objects that can be used to filter the list of files returned.

Return Value

An array of AbstractFile objects representing the files that match the specified filters.
Remarks

To filter a list of files or folders, you can pass a variable number of objects in the filters parameter. These objects may be of the following types:

Object type Type of filter applied
System.String The string is assumed to be a file mask, and a NameFilter object is automatically created for the passed string, with FilterScope.File as the default FilterScope.
System.IO.FileAttributes A AttributeFilter object is automatically created for the provided attributes, with FilterScope.File as the default FilterScope.
Filter The provided Filter object is used as-is. By default, an AndFilter is used.
Array of System.Object Each object in the array may be of the types described in this table, and is used accordingly.
Other If any other type is found, an exception is thrown.

For more detailed information on how to use filters, please refer to the Using filters topic.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

AbstractFolder Class
AbstractFolder Members
Overload List