Namespace: ITHit.WebDAV.Client
The IFile type exposes the following members.
Name | Description | |
---|---|---|
ActiveLocks | Array of item's lock descriptions. (Inherited from IHierarchyItem.) | |
CheckedOut | Provides information whether item is in checked-in or checked-out state. | |
ContentLength |
Length of the file content.
(Inherited from IItemContent.) | |
ContentType |
Content type of the file.
(Inherited from IItemContent.) | |
CreationDate |
The date item was created.
(Inherited from IHierarchyItem.) | |
DisplayName | User friendly item name. (Inherited from IHierarchyItem.) | |
Etag |
Gets entity tag - string that identifies current state of file's content.
(Inherited from IItemContent.) | |
Href |
This item path on the server.
(Inherited from IHierarchyItem.) | |
ItemType |
Type of the item (File, Folder, Version or VersionHistory)
(Inherited from IHierarchyItem.) | |
LastModified |
Most recent modification date.
(Inherited from IHierarchyItem.) | |
Properties |
Custom properties retrieved by [!:IFolder.GetChildrenAsync(bool, PropertyName[])] call.
(Inherited from IHierarchyItem.) | |
ResumableUpload |
Returns instance of IResumableUpload to manage partially failed uploads.
(Inherited from IItemContent.) | |
SupportedLock | Lock types supported by the item. (Inherited from IHierarchyItem.) | |
VersionControlled | Provides information whether item is under version control. |
Name | Description | |
---|---|---|
CheckInAsync |
Creates new version.
| |
CheckOutAsync |
Allow modifications to the content and custom properties of this version-controlled file.
| |
CopyToAsync |
Copies this item to destination folder.
(Inherited from IHierarchyItem.) | |
DeleteAsync(IDictionaryString, String, CancellationToken) |
Deletes this item.
(Inherited from IHierarchyItem.) | |
DeleteAsync(String, IDictionaryString, String, CancellationToken) |
Deletes this item.
(Inherited from IHierarchyItem.) | |
DeleteAsync(LockUriTokenPair, IDictionaryString, String, CancellationToken) |
Deletes this item.
(Inherited from IHierarchyItem.) | |
DownloadAsync |
Downloads content of the file to a file specified by filename.
(Inherited from IItemContent.) | |
GetActiveLocksAsync | Obsolete.
Retrieves lock information about this item.
(Inherited from IHierarchyItem.) | |
GetAllPropertiesAsync |
Retrieves all custom properties exposed by the item.
(Inherited from IHierarchyItem.) | |
GetAutoVersionAsync |
Determines how checked-in item responds to WebDAV client attempts to modify its content or properties.
| |
GetCommentAsync |
Brief comment about an item that is suitable for presentation to a user.
(Inherited from IHierarchyItem.) | |
GetCreatorDisplayNameAsync |
Contains a description of the creator of the item that is suitable for presentation to a user.
(Inherited from IHierarchyItem.) | |
GetCurrentVersionAsync | Current item version. Null, if item is not under version control. | |
GetParentAsync |
Retrieves parent hierarchy item of this item.
(Inherited from IHierarchyItem.) | |
GetPropertyNamesAsync |
Returns names of all custom properties exposed by this item.
(Inherited from IHierarchyItem.) | |
GetPropertyValuesAsync |
Retrieves values of specific properties.
(Inherited from IHierarchyItem.) | |
GetReadStreamAsync |
Loads content of the file from WebDAV server.
(Inherited from IItemContent.) | |
GetReadStreamAsync(Int64, Int64, DateTime) |
Loads part of the content of the file from WebDAV server using lastModifiedUtc
to ensure the content is up-to-date.
(Inherited from IItemContent.) | |
GetReadStreamAsync(Int64, Int64, IDictionaryString, String, CancellationToken) |
Loads part of the content of the file from WebDAV server.
(Inherited from IItemContent.) | |
GetReadStreamAsync(Int64, Int64, String, IDictionaryString, String, CancellationToken) |
Loads part of the content of the file from WebDAV server using eTag to
ensure the content is up-to-date.
(Inherited from IItemContent.) | |
GetSourceAsync |
Retrieves media type independent links.
(Inherited from IHierarchyItem.) | |
GetSupportedLockAsync | Obsolete. Retrieves information about supported locks. (Inherited from IHierarchyItem.) | |
GetVersionsAsync | Retrieves list of all versions for this file. | |
IsCheckedOutAsync | Obsolete. Determines whether item is in checked-in or checked-out state. | |
IsVersionControlledAsync | Obsolete. Determines whether item is under version control. | |
LockAsync |
Locks the item.
(Inherited from IHierarchyItem.) | |
MoveToAsync(IFolder, String, Boolean) |
Moves this item to another location.
(Inherited from IHierarchyItem.) | |
MoveToAsync(IFolder, String, Boolean, LockUriTokenPair) |
Moves this item to another location.
(Inherited from IHierarchyItem.) | |
PutUnderVersionControlAsync |
Enables / disables version control for this file.
| |
RefreshAsync |
Rereads item properties from server.
(Inherited from IHierarchyItem.) | |
RefreshLockAsync |
Prolongs the lock.
(Inherited from IHierarchyItem.) | |
SetAutoVersionAsync(AutoVersion) |
Sets how checked-in item responds to WebDAV client attempts to modify its content or properties.
| |
SetAutoVersionAsync(AutoVersion, String) |
Sets how checked-in item responds to WebDAV client attempts to modify its content or properties.
| |
SetCommentAndAuthorAsync(String, String) |
Updates comment and author information.
(Inherited from IHierarchyItem.) | |
SetCommentAndAuthorAsync(String, String, String) |
Updates comment and author information.
(Inherited from IHierarchyItem.) | |
SupportedFeaturesAsync |
Gets the information about functionality supported by server (Class 1, Class 2 and so on).
(Inherited from IHierarchyItem.) | |
UnCheckOutAsync |
Cancels the CHECKOUT and restore the pre-CHECKOUT state of the version-controlled resource.
| |
UnlockAsync(String, IDictionaryString, String, CancellationToken) |
Remove the locks.
(Inherited from IHierarchyItem.) | |
UnlockAsync(LockUriTokenPair, IDictionaryString, String, CancellationToken) |
Removes the locks. For details UnlockAsync(String, IDictionaryString, String, CancellationToken).
(Inherited from IHierarchyItem.) | |
UpdatePropertiesAsync(Property, PropertyName) |
Updates values of properties exposed by this item.
(Inherited from IHierarchyItem.) | |
UpdatePropertiesAsync(Property, PropertyName, String) |
Updates values of properties exposed by this item.
(Inherited from IHierarchyItem.) | |
UpdateToVersionAsync(IVersion) |
Updates content and dead properties of item to those identified by version.
| |
UpdateToVersionAsync(IVersion, String) |
Updates content and dead properties of item to those identified by version.
| |
UploadAsync(String, LockUriTokenPair, IDictionaryString, String, CancellationToken) |
Uploads content of a file specified by filename to the server.
(Inherited from IItemContent.) | |
UploadAsync(FuncStream, Task, Int64, LockUriTokenPair, IDictionaryString, String, CancellationToken) |
Uploads content of a file specified by function onStreamAvailable to the server.
(Inherited from IItemContent.) |
string license = "<?xml version='1.0' encoding='utf... WebDavSessionAsync session = new WebDavSessionAsync(license); session.Credentials = new NetworkCredential("User1", "pwd"); IFile davFile = await session.GetFileAsync("https://server:8080/Products/image.gif"); using (Stream webStream = await davFile.GetReadStreamAsync()) { int bufSize = 1048576; // 1Mb byte[] buffer = new byte[bufSize]; int bytesRead = 0; using (FileStream fileStream = File.OpenWrite(davFile.DisplayName)) { while ((bytesRead = await webStream.ReadAsync(buffer, 0, bufSize)) > 0) await fileStream.WriteAsync(buffer, 0, bytesRead); } }