Click or drag to resize

IQuotaAsyncGetAvailableBytesAsync Method

IT Hit WebDAV Classes Reference
Value in bytes representing the amount of additional disk space beyond the current allocation that can be allocated to the folder (or other item) before further allocations will be refused.

Namespace:  ITHit.WebDAV.Server.Quota
Assembly:  ITHit.WebDAV.Server (in ITHit.WebDAV.Server.dll) Version: 11.3.10719
Syntax
Task<long> GetAvailableBytesAsync()

Task<long> GetAvailableBytesAsync()

Return Value

Type: TaskInt64
Bytes that can be additionally allocated in folder/file.
Exceptions
ExceptionCondition
NeedPrivilegesExceptionThe user doesn't have enough privileges.
DavExceptionIn other cases.
Examples

The code below is part of 'WebDAVServer.FileSystemStorage.AspNet' C# & VB samples provided with the SDK.

public async Task<long> GetAvailableBytesAsync()
{
    // Here you can return amount of bytes available for current user.
    // For the sake of simplicity we return entire available disk space.

    // Note: NTFS quotes retrieval for current user works very slowly.

    return await dirInfo.GetStorageFreeBytesAsync();
}
See Also