Class: Version

Version Class

Namespace

ITHit.WebDAV.Client
Represents a version on a WebDAV server.

Extends

Members

Comment :string

Comment

ContentLength :number

ContentLength
Length of the file.

ContentType :string

ContentType
Content type of the file.

CreationDate :Date

CreationDate
The date item was created.

CreatorDisplayName :string

CreatorDisplayName

DisplayName :string

DisplayName
User friendly item name.

Href :string

Href
This item path on the server.

Properties :ITHit.WebDAV.Client.PropertyList

Properties
List of item properties.
Current WebDAV session.

VersionName :string

VersionName
This property contains a server-defined string that is different for each version. This string is intended for display for a user.

Methods

DeleteAsync(fCallback) → {ITHit.WebDAV.Client.Request}

DeleteAsync
Delete version by self href.
Name Type Description
fCallback ITHit.WebDAV.Client.Version~DeleteAsyncCallback Function to call when operation is completed.
Returns:
ITHit.WebDAV.Client.Request Request object.

ReadContentAsync(iBytesFrom, iBytesCount, fCallback) → {ITHit.WebDAV.Client.Request}

ReadContentAsync
Read file content. To download only a part of a file you can specify 2 parameters in ReadContent call. First parameter is the starting byte (zero-based) at witch to start content download, the second – amount of bytes to be downloaded. The library will add Range header to the request in this case.
Name Type Description
iBytesFrom number Start position to retrieve lBytesCount number of bytes from.
iBytesCount number Number of bytes to retrieve.
fCallback ITHit.WebDAV.Client.File~ReadContentAsyncCallback Function to call when operation is completed.
Returns:
ITHit.WebDAV.Client.Request Request object.
Examples

RefreshAsync(fCallback) → {ITHit.WebDAV.Client.Request}

RefreshAsync
Refreshes item loading data from server.
Name Type Description
fCallback ITHit.WebDAV.Client.HierarchyItem~RefreshAsyncCallback Function to call when operation is completed.
Returns:
ITHit.WebDAV.Client.Request Request object.

UpdateToThisAsync(fCallback) → {ITHit.WebDAV.Client.Request}

UpdateToThisAsync
Update file to current version.
Name Type Description
fCallback ITHit.WebDAV.Client.Version~UpdateToThisVersionAsync Function to call when operation is completed.
Returns:
ITHit.WebDAV.Client.Request Request object.
Examples

WriteContentAsync(sContent, sLockToken, sMimeType, fCallback) → {ITHit.WebDAV.Client.Request}

WriteContentAsync
Writes file content.
Name Type Description
sContent string File content.
sLockToken string Lock token.
sMimeType string File mime-type.
fCallback ITHit.WebDAV.Client.File~WriteContentAsyncCallback Function to call when operation is completed.
Returns:
ITHit.WebDAV.Client.Request Request object.

Type Definitions

DeleteAsyncCallback(oResult)

DeleteAsyncCallback
Callback function to be called when version is deleted on server.
Name Type Description
oResult ITHit.WebDAV.Client.AsyncResult Result object

UpdateToThisVersionAsync(oResult)

UpdateToThisVersionAsync
Callback function to be called when version is updated on server.
Name Type Description
oResult ITHit.WebDAV.Client.AsyncResult Result object