IFileSystemInfoList.Count

Syntax

Count: Integer;

Description

The Count property returns the number of elements in the collection.

Example

Sub Main;

Var

DirInfo: IDirectoryInfo;

SysInfoList: IFileSystemInfoList;

i: Integer;

Begin

DirInfo:=New DirectoryInfo.Attach("c:\New_folder");

If DirInfo.Exists Then

SysInfoList:=DirInfo.GetFileSystemInfos("*");

i:=SysInfoList.Count;

End If;

Dispose DirInfo;

End Sub Main;

After executing the example the "i" variable contains the number of subdirectories and files of the directory C:\New_folder.

See also:

IFileSystemInfoList