SECFileSystem::GetDirectorySize

LONGSECFileSystem::GetDirectorySize(const CString&Directory= "", const CString&WildCard= "*.*", const BOOLbRecurseSubdirs= FALSE)

Returns the number of bytes in all the files in a directory.

Defined in: filesys.cpp

Return Value

The sum of all the sizes of the files in the current directory.

Comments

To return the size (in bytes) of the files in the specified directory.

If an error occurs in reading the status of a file, that file is skipped and not counted as part of the size. There is currently no way to find out if an error of this kind occurred.

Example

LONG lSize = fs.GetDirectorySize("c:\\foo\\bar", "*.*", TRUE);

Parameters

Directory

Name of directroy to get the size of. If not specified, the current directory is assumed.

WildCard

Wildcard to use when looking for files.

bRecurseSubdirs

Whether to traverse subdirectories.

See Also

SECFileSystem  GetFileSize