public virtual long GetDiskFreeSpace()
{
if (GetType() == TypeShare || Type == TypeFilesystem)
{
int level = Trans2QueryFsInformationResponse.SmbFsFullSizeInformation;
try
{
return QueryFsInformation(level);
}
catch (SmbException ex)
{
switch (ex.GetNtStatus())
{
case NtStatus.NtStatusInvalidInfoClass:
case NtStatus.NtStatusUnsuccessful:
{
// NetApp Filer
// SMB_FS_FULL_SIZE_INFORMATION not supported by the server.
level = Trans2QueryFsInformationResponse.SMB_INFO_ALLOCATION;
return QueryFsInformation(level);
}
}
throw;
}
}
return 0L;
}