Represents a file on a WebDAV server.
Extends
Members
-
ActiveLocks :Array.<ITHit.WebDAV.Client.LockInfo>
ActiveLocks -
List of locks applied to this item.
Examples
-
AvailableBytes :number
AvailableBytes -
Number of bytes available for this user on server. -1 if server does not support Quota.
-
ContentLength :number
ContentLength -
Length of the file.
-
ContentType :string
ContentType -
Content type of the file.
-
CreationDate :Date
CreationDate -
The date item was created.
-
DisplayName :string
DisplayName -
User friendly item name.
-
Href :string
Href -
This item path on the server.
-
LastModified :Date
LastModified -
Most recent modification date.
-
Properties :ITHit.WebDAV.Client.PropertyList
Properties -
List of item properties.
-
ResourceType :string
ResourceType -
Type of the item (File or Folder).
-
ResumableUpload :ITHit.WebDAV.Client.ResumableUpload
ResumableUpload -
ResumableUpload instance to manage partially failed uploads.
-
Session :ITHit.WebDAV.Client.WebDavSession
Session -
Current WebDAV session.
-
SupportedLocks :Array.<string>
SupportedLocks -
Retrieves information about supported locks. Item can support exclusive, shared locks or do not support any locks. If you set exclusive lock other users will not be able to set any locks. If you set shared lock other users will be able to set shared lock on the item.
Examples
-
UsedBytes :number
UsedBytes -
Number of bytes used by this user on server. -1 if server does not support Quota.
-
VersionControlled
VersionControlled -
Returns true if file is under version control. Otherwise false. To detect if version control could be enabled for this item call GetSupportedFeaturesAsync and check for VersionControl token. To enable version control call PutUnderVersionControlAsync.
Methods
-
static ITHit.WebDAV.Client.File.GEdit(oRequest, sHref) → {ITHit.WebDAV.Client.GEditInfo}
GEdit -
Locks the item and upload to google drive.
Name Type Description oRequestITHit.WebDAV.Client.Request Current WebDAV session. sHrefstring This item path on the server. Returns:
ITHit.WebDAV.Client.GEditInfo Instance of GEditInfo. -
static ITHit.WebDAV.Client.File.GEditAsync(oRequest, sHref, fCallback) → {ITHit.WebDAV.Client.Request}
GEditAsync -
Locks the item and upload to google drive.
Name Type Description oRequestITHit.WebDAV.Client.Request Current WebDAV session. sHrefstring This item path on the server. fCallbackITHit.WebDAV.Client.File~GEditAsyncCallback Function to call when operation is completed. Returns:
ITHit.WebDAV.Client.Request Request object. -
static ITHit.WebDAV.Client.File.GUnlock(oRequest, sHref, sLockToken)
GUnlock -
Removes the lock and update file.
Name Type Description oRequestITHit.WebDAV.Client.Request Current WebDAV session. sHrefstring This item path on the server. sLockTokenstring optional Identifies lock to be prolonged. Throws:
-
ITHit.WebDAV.Client.Exceptions.PreconditionFailedException The item is not locked.
-
ITHit.WebDAV.Client.Exceptions.NotFoundException The item doesn't exist on the server.
-
ITHit.WebDAV.Client.Exceptions.WebDavException Unexpected error occurred.
-
-
static ITHit.WebDAV.Client.File.GUnlockAsync(oRequest, sHref, sLockToken, sRevisionID, fCallback) → {ITHit.WebDAV.Client.Request}
GUnlockAsync -
Removes the lock and update file.
Name Type Description oRequestITHit.WebDAV.Client.Request Current WebDAV session. sHrefstring This item path on the server. sLockTokenstring Identifies lock to be prolonged. sRevisionIDstring Revision ID of google file. fCallbackITHit.WebDAV.Client.File~GUnlockAsyncCallback Function to call when operation is completed. Returns:
ITHit.WebDAV.Client.Request Request object. -
inherited CopyToAsync(oDestinationFolder, sDestinationName, bDeep, bOverwrite, oLockTokens, fCallback)
CopyToAsync -
Copies this item to destination folder.
Name Type Description oDestinationFolderITHit.WebDAV.Client.Folder Folder to move to. sDestinationNamestring Name to assign to copied item. bDeepboolean Indicates whether children of this item should be copied. bOverwriteboolean Whether existing destination item shall be overwritten. oLockTokensArray.<ITHit.WebDAV.Client.LockUriTokenPair> optional Lock tokens for destination folder. fCallbackITHit.WebDAV.Client.HierarchyItem~CopyToAsyncCallback Function to call when operation is completed. Examples
-
inherited DeleteAsync(oLockTokens, fCallback) → {ITHit.WebDAV.Client.Request}
DeleteAsync -
Deletes this item.
Name Type Description oLockTokensITHit.WebDAV.Client.LockUriTokenPair | null Lock tokens for this item or any locked child item. fCallbackITHit.WebDAV.Client.HierarchyItem~DeleteAsyncCallback Function to call when operation is completed. Returns:
ITHit.WebDAV.Client.Request Request object. Examples
-
inherited GetAllPropertiesAsync(fCallback) → {ITHit.WebDAV.Client.Request}
GetAllPropertiesAsync -
Retrieves all custom properties exposed by the item.
Name Type Description fCallbackITHit.WebDAV.Client.HierarchyItem~GetAllPropertiesAsyncCallback Function to call when operation is completed. Returns:
ITHit.WebDAV.Client.Request Request object. Examples
-
inherited GetParentAsync(aProperties, fCallback) → {ITHit.WebDAV.Client.Request}
GetParentAsync -
Retrieves parent hierarchy item of this item.
Name Type Description aPropertiesArray.<ITHit.WebDAV.Client.PropertyName> Additional properties requested from server. Default is empty array. fCallbackITHit.WebDAV.Client.HierarchyItem~GetParentAsyncCallback Function to call when operation is completed. Returns:
ITHit.WebDAV.Client.Request Request object. Examples
-
inherited GetPropertyNamesAsync(fCallback) → {ITHit.WebDAV.Client.Request}
GetPropertyNamesAsync -
Returns names of all custom properties exposed by this item.
Name Type Description fCallbackITHit.WebDAV.Client.HierarchyItem~GetPropertyNamesAsyncCallback Function to call when operation is completed. Returns:
ITHit.WebDAV.Client.Request Request object. Examples
-
inherited GetPropertyValuesAsync(aNames, fCallback) → {ITHit.WebDAV.Client.Request}
GetPropertyValuesAsync -
Retrieves values of specific properties.
Name Type Description aNamesArray.<ITHit.WebDAV.Client.PropertyName> fCallbackITHit.WebDAV.Client.HierarchyItem~GetPropertyValuesAsyncCallback Function to call when operation is completed. Returns:
ITHit.WebDAV.Client.Request Request object. Examples
-
inherited GetSourceAsync(fCallback) → {ITHit.WebDAV.Client.Request}
GetSourceAsync -
Retrieves media type independent links.
Name Type Description fCallbackITHit.WebDAV.Client.HierarchyItem~GetSourceAsyncCallback Function to call when operation is completed. Returns:
ITHit.WebDAV.Client.Request Request object. -
inherited GetSupportedFeaturesAsync(fCallback) → {ITHit.WebDAV.Client.Request}
GetSupportedFeaturesAsync -
Gets features supported by this item, such as WebDAV class support.
Name Type Description fCallbackITHit.WebDAV.Client.HierarchyItem~GetSupportedFeaturesAsyncCallback Function to call when operation is completed. Returns:
ITHit.WebDAV.Client.Request Request object. Examples
-
GetVersionsAsync(fCallback) → {ITHit.WebDAV.Client.Request}
GetVersionsAsync -
Retrieves item versions.
Name Type Description fCallbackITHit.WebDAV.Client.File~GetVersionsAsyncCallback Function to call when operation is completed. Returns:
ITHit.WebDAV.Client.Request Request object. Examples
-
inherited LockAsync(sLockScope, bDeep, sOwner, iTimeout, fCallback) → {ITHit.WebDAV.Client.Request}
LockAsync -
Locks the item. If the lock was successfully applied, the server will return a lock token. You will pass this lock token back to the server when updating and unlocking the item. The actual lock time applied by the server may be different from the one requested by the client.
Name Type Description sLockScopestring Scope of the lock. See LockScope Enumeration ITHit.WebDAV.Client.LockScope bDeepboolean Whether to lock entire subtree. sOwnerstring Owner of the lock. iTimeoutnumber Timeout after which lock expires. Pass -1 to request an infinite timeout. fCallbackITHit.WebDAV.Client.HierarchyItem~LockAsyncCallback Function to call when operation is completed. Returns:
ITHit.WebDAV.Client.Request Request object. Examples
-
inherited MoveToAsync(oDestinationFolder, sDestinationName, bOverwrite, oLockTokens, fCallback) → {ITHit.WebDAV.Client.Request}
MoveToAsync -
Moves this item to another location.
Name Type Description oDestinationFolderITHit.WebDAV.Client.Folder Folder to move to. sDestinationNamestring Name to assign to moved item. bOverwriteboolean Whether existing destination item shall be overwritten. oLockTokensstring | Array.<ITHit.WebDAV.Client.LockUriTokenPair> Lock tokens for item to be moved, for destination folder or file to be overwritten that are locked. fCallbackITHit.WebDAV.Client.HierarchyItem~MoveToAsyncCallback Function to call when operation is completed. Returns:
ITHit.WebDAV.Client.Request Request object. Examples
-
PutUnderVersionControlAsync(bEnable, mLockToken, fCallback) → {ITHit.WebDAV.Client.Request}
PutUnderVersionControlAsync -
Enables / disables version control for this file.
Name Type Description bEnableboolean True to enable version-control, false - to disable. mLockTokenstring Lock token for this item. fCallbackITHit.WebDAV.Client.File~PutUnderVersionControlAsyncCallback Function to call when operation is completed. Returns:
ITHit.WebDAV.Client.Request Request object. Examples
-
ReadContentAsync(iBytesFrom, iBytesCount, fCallback) → {ITHit.WebDAV.Client.Request}
ReadContentAsync -
Reads 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 iBytesFromnumber Start position to retrieve lBytesCount number of bytes from. iBytesCountnumber Number of bytes to retrieve. fCallbackITHit.WebDAV.Client.File~ReadContentAsyncCallback Function to call when operation is completed. Returns:
ITHit.WebDAV.Client.Request Request object. Examples
-
inherited RefreshAsync(fCallback) → {ITHit.WebDAV.Client.Request}
RefreshAsync -
Refreshes item loading data from server.
Name Type Description fCallbackITHit.WebDAV.Client.HierarchyItem~RefreshAsyncCallback Function to call when operation is completed. Returns:
ITHit.WebDAV.Client.Request Request object. Examples
-
inherited RefreshLockAsync(sLockToken, iTimeout, fCallback) → {ITHit.WebDAV.Client.Request}
RefreshLockAsync -
Prolongs the lock.
Name Type Description sLockTokenstring Identifies lock to be prolonged. iTimeoutnumber New timeout to set. fCallbackITHit.WebDAV.Client.HierarchyItem~RefreshLockAsyncCallback Function to call when operation is completed. Returns:
ITHit.WebDAV.Client.Request Request object. Examples
-
inherited UnlockAsync(sLockToken, fCallback) → {ITHit.WebDAV.Client.Request}
UnlockAsync -
Removes the lock.
Name Type Description sLockTokenstring Identifies lock to be prolonged. fCallbackITHit.WebDAV.Client.HierarchyItem~UnlockAsyncCallback Function to call when operation is completed. Returns:
ITHit.WebDAV.Client.Request Request object. Examples
-
inherited UpdatePropertiesAsync(oPropertiesToAddOrUpdate, oPropertiesToDelete, sLockToken, fCallback) → {ITHit.WebDAV.Client.WebDavRequest|null}
UpdatePropertiesAsync -
Updates values of properties exposed by this item.
Name Type Description oPropertiesToAddOrUpdateArray.<ITHit.WebDAV.Client.Property> Properties to be updated. oPropertiesToDeleteArray.<ITHit.WebDAV.Client.PropertyName> Names of properties to be removed from this item. sLockTokenstring optional Lock token. fCallbackITHit.WebDAV.Client.HierarchyItem~UpdatePropertiesAsyncCallback Function to call when operation is completed. Returns:
ITHit.WebDAV.Client.WebDavRequest | null WebDAV request Examples
-
UpdateToVersionAsync(mVersion, fCallback) → {ITHit.WebDAV.Client.Request}
UpdateToVersionAsync -
Update to version.
Name Type Description mVersionstring | ITHit.WebDAV.Client.Version Href to file with version attribute or ITHit.WebDAV.Client.Version instance. fCallbackITHit.WebDAV.Client.File~UpdateToVersionAsyncCallback 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 sContentstring File content. sLockTokenstring Lock token. sMimeTypestring File mime-type. fCallbackITHit.WebDAV.Client.File~WriteContentAsyncCallback Function to call when operation is completed. Returns:
ITHit.WebDAV.Client.Request Request object. Examples
Type Definitions
-
GEditAsyncCallback(oResult)
GEditAsyncCallback -
Callback function to be called when item is locked on server.
Name Type Description oResultITHit.WebDAV.Client.AsyncResult Result object Name Type Description ResultITHit.WebDAV.Client.GEditInfo Instance of GEditInfo. -
GetVersionsAsyncCallback(oResult)
GetVersionsAsyncCallback -
Callback function to be called when versions list loaded from server.
Name Type Description oResultITHit.WebDAV.Client.AsyncResult Result object Name Type Description ResultArray.<ITHit.WebDAV.Client.Version> List of Versions. -
GUnlockAsyncCallback(oResult)
GUnlockAsyncCallback -
Callback function to be called when item unlocked on server.
Name Type Description oResultITHit.WebDAV.Client.AsyncResult Result object -
OpenAsyncCallback(oResult)
OpenAsyncCallback -
Callback function to be called when resource loaded from server.
Name Type Description oResultITHit.WebDAV.Client.AsyncResult Result object Name Type Description ResultITHit.WebDAV.Client.File Loaded resource object. -
PutUnderVersionControlAsyncCallback(oResult)
PutUnderVersionControlAsyncCallback -
Callback function to be called when versioning is enabled or disabled.
Name Type Description oResultITHit.WebDAV.Client.AsyncResult Result object -
ReadContentAsyncCallback(oResult)
ReadContentAsyncCallback -
Callback function to be called when file content loaded from server.
Name Type Description oResultITHit.WebDAV.Client.AsyncResult Result object Name Type Description Resultstring Requested file content. -
UpdateToVersionAsyncCallback(oResult)
UpdateToVersionAsyncCallback -
Callback function to be called when version is updated on server.
Name Type Description oResultITHit.WebDAV.Client.AsyncResult Result object -
WriteContentAsyncCallback(oResult)
WriteContentAsyncCallback -
Callback function to be called when content saved in file on server.
Name Type Description oResultITHit.WebDAV.Client.AsyncResult Result object