Back to the WFC main page

wfc_get_directory_usage_percentage

$Revision: 8 $

Declaration

DWORD wfc_get_directory_usage_percentage( const CString& directory_name )

Description

This function tells you how much space is used by the specified directory. It takes into account quotas and distributed file systems (DFS). If the function fails, it will return zero.

Example

void check_home_directory_usage( const CString& home_directory )
{
   WFCTRACEINIT( TEXT( "check_home_directory_usage()" ) );

   double percent_used = wfc_get_directory_usage_percentage( home_directory );

   if ( percent_used >= 85.0 )
   {
      _tprintf( "%s is %lf full\n", (LPCTSTR) home_directory, percent_used );
   }
}

API's Used

wfc_get_directory_usage_percentage() uses the following API's:
Copyright, 2000, Samuel R. Blackburn
$Workfile: wfc_get_directory_usage_percentage.cpp $
$Modtime: 1/17/00 9:33a $