ShellBrowser .Net Edition
GetFolderSize Method (p_Path, p_FileCount, p_FolderCount)
NamespacesJam.ShellPathCollectionGetFolderSize(String, Int32%, Int32%)
Returns the size of a folder, including all files in all subfolders, and the file count.
path must include a trailing backslash
Declaration Syntax
C#Visual BasicVisual C++
public static long GetFolderSize(
	string p_Path,
	out int p_FileCount,
	out int p_FolderCount
)
Public Shared Function GetFolderSize ( _
	p_Path As String, _
	<OutAttribute> ByRef p_FileCount As Integer, _
	<OutAttribute> ByRef p_FolderCount As Integer _
) As Long
public:
static long long GetFolderSize(
	String^ p_Path, 
	[OutAttribute] int% p_FileCount, 
	[OutAttribute] int% p_FolderCount
)
Parameters
p_Path (String)
The full path of the folder.
p_FileCount ( Int32 %)
A variable in that the number of files will be returned.
p_FolderCount ( Int32 %)
A variable in that the number of subfolders will be returned.
Return Value
The size of the given folder in Bytes.
Return Value
Exceptions
ExceptionCondition
DirectoryNotFoundExceptionThe path is invalid, such as being on an unmapped drive.
ArgumentNullException p_Path is a null reference
SecurityExceptionThe caller does not have the required permission.

Assembly: ShellBrowser (Module: ShellBrowser) Version: 4.2.1.45 (4.2.1.45)