Interface IDocument
The document of a collection
Inherited Members
Namespace:FubarDev.WebDavServer.FileSystem
Assembly:FubarDev.WebDavServer.dll
Syntax
public interface IDocument : IEntry
Properties
| Improve this Doc View SourceLength
Gets the length of the document
Declaration
long Length { get; }
Property Value
Type | Description |
---|---|
Int64 |
Methods
| Improve this Doc View SourceCopyToAsync(ICollection, String, CancellationToken)
Copies the document to a new location within the same file system
Declaration
[NotNull]
[ItemNotNull]
Task<IDocument> CopyToAsync([NotNull] ICollection collection, [NotNull] string name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
ICollection | collection | The destination collection |
String | name | The new name of the document |
CancellationToken | cancellationToken | The cancellation token |
Returns
Type | Description |
---|---|
Task<IDocument> | The created document |
CreateAsync(CancellationToken)
Overwrites the document
Declaration
[NotNull]
[ItemNotNull]
Task<Stream> CreateAsync(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | The cancellation token |
Returns
Type | Description |
---|---|
Task<Stream> | The stream used to write to the document |
MoveToAsync(ICollection, String, CancellationToken)
Moves the document to a new location within the same file system
Declaration
[NotNull]
[ItemNotNull]
Task<IDocument> MoveToAsync([NotNull] ICollection collection, [NotNull] string name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
ICollection | collection | The destination collection |
String | name | The new name of the document |
CancellationToken | cancellationToken | The cancellation token |
Returns
Type | Description |
---|---|
Task<IDocument> | The created document |
OpenReadAsync(CancellationToken)
Opens the document for reading
Declaration
[NotNull]
[ItemNotNull]
Task<Stream> OpenReadAsync(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | The cancellation token |
Returns
Type | Description |
---|---|
Task<Stream> | The stream used to read the document |