NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Directory.GetFiles (String)

Returns a file list from the current directory matching the given search criteria, such as "*.txt".

[Visual Basic]
Overloads Public Function GetFiles( _
   ByVal searchCriteria As String _
) As File ()
[C#]
public File[] GetFiles(
   string searchCriteria
);
[C++]
public: File* GetFiles(
   String* searchCriteria
) [];
[JScript]
public function GetFiles(
   searchCriteria : String
) : File[];

Parameters

searchCriteria
The search string.

Return Value

An array of file names.

Exceptions

Exception Type Condition
ArgumentNullException searchCriteria is null.

Remarks

".." can only be used in searchCriteria if it is specified as a part of a valid file or directory name. It cannot be used to move up the directory hierarchy. For example:

a..b abc..d is valid.

..ab ab.. .. abc..d\abc.. is invalid.

Other wild card characters are allowed in searchCriteria. For example, a search string such as "System*" would match both the System and System32 directories.

See Also

Directory Class | Directory Members | System.IO Namespace | Directory.GetFiles Overload List