Home Notices Documents Classes Download Others Rice
Classes  >  directory  >  GetDirectories(string)
directory class : GetDirectories(string) method

Description

Gets a list of subdirectories that match to the specified pattern.

Syntax

directoryInstance.GetDirectories(string pattern)

Arguments

ClassNameDescription
stringpatternSearch pattern.

Return value

ClassDescription
list{directory}A list of subdirectories that matches to the specified pattern.

Sample code

1:

directory dir = new directory("c:\somewhere...");

2:

list{directory} subDirectories = dir.GetDirectories("c*"); // Subdirectories that starts with "c".

Notes

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

Please note that this method do not work recursively. It returns a list of direct children.

Links for reference

Copyright © Rice All rights reserved.