Home Cooker Classes Others Rice CookerGX
Classes  >  directory  >  GetFiles(string)
directory class : GetFiles(string) method

Description

Gets the list of files that match to the specified pattern.

Syntax

directoryInstance.GetFiles(string pattern)

Arguments

ClassNameDescription
stringpatternSearch pattern for the name of files.

Return value

ClassDescription
list{file}List of files that match to the specified pattern.

Sample code

//anyDirectory is a instance of directory type.

list{file} txtFiles = anyDirectory.GetFiles("*.txt");//File with the extension "txt".

Notes

It's a wrapper of the System.IO.DirectoryInfo.GetFiles(String).

Please note that do not work recursively. This method return the list of direct child files.

Links for reference

Copyright © Rice All rights reserved.