Click or drag to resize

IQuotaGetAvailableBytesAsync 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: 13.3.13068
Syntax
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