Click or drag to resize

IContentAsyncContentLength Property

IT Hit WebDAV Classes Reference
Gets the size of the file content in bytes.

Namespace:  ITHit.WebDAV.Server
Assembly:  ITHit.Server (in ITHit.Server.dll) Version: 9.1.5311-Beta
Syntax
long ContentLength { get; }

Property Value

Type: Int64
Length of the file content in bytes.
Remarks

A value of this property is used when listing folder content (in PROPFIND request) as well as when reading file content (in GET request and HEAD requests).

A value returned by this property must exacly match the ammount of bytes returned by method. Otherwise the file content will be truncated or the GET request will never finish writing output.

Examples

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

public long ContentLength
{
    get { return fileInfo.Length; }
}
See Also