ZennoLab Assemblies Documentation
DirectorySubItem Method
Example 

Type: System.String

Path to the directory.

Type: System.String

Sampling units ("d" - directories, "f" - files, "df" - all together) .

Type: System.String

The number of the element.

Type: System.Boolean

true if sort items before sampling; otherwise, false.

The path to a file/subdirectory in the specified directory
Syntax
public static string DirectorySubItem( 
   string pathToDirectory,
   string items,
   string itemNumber,
   bool sortAlphabetically
)

Parameters

pathToDirectory

Type: System.String

Path to the directory.

items

Type: System.String

Sampling units ("d" - directories, "f" - files, "df" - all together) .

itemNumber

Type: System.String

The number of the element.

sortAlphabetically

Type: System.Boolean

true if sort items before sampling; otherwise, false.

Return Value

Type: System.String

Directory entries .

Example
The following example shows call the DirectorySubItem method.
string pathToDirectory = {pathToDirectory};
string items = "df";
string itemNumber = "0";
bool sortAlphabetically = false;
string result = FileSystem.DirectorySubItem(pathToDirectory, items, itemNumber, sortAlphabetically);
$pathToDirectory = {pathToDirectory};
$items = "df";
$itemNumber = "0";
$sortAlphabetically = false;
$result = FileSystem::DirectorySubItem($pathToDirectory, $items, $itemNumber, $sortAlphabetically);
Requirements

Target Platforms: Desktop: Windows XP SP3 and older. Server: Windows Server 2003 and older.

See Also

Reference

FileSystem Class
FileSystem Members

Send Feedback