Class WebDavDispatcherClass1
The default WebDAV class 1 implementation
Inherited Members
Namespace:FubarDev.WebDavServer.Dispatchers
Assembly:FubarDev.WebDavServer.dll
Syntax
public class WebDavDispatcherClass1 : IWebDavClass1, IWebDavClass
Constructors
| Improve this Doc View SourceWebDavDispatcherClass1(IEnumerable<IClass1Handler>, IWebDavContext, IDeadPropertyFactory, IOptions<WebDavDispatcherClass1Options>)
Initializes a new instance of the WebDavDispatcherClass1 class.
Declaration
public WebDavDispatcherClass1([NotNull, ItemNotNull] IEnumerable<IClass1Handler> class1Handlers, [NotNull] IWebDavContext context, [NotNull] IDeadPropertyFactory deadPropertyFactory, [CanBeNull] IOptions<WebDavDispatcherClass1Options> options)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<IClass1Handler> | class1Handlers | The WebDAV class 1 handlers |
IWebDavContext | context | The WebDAV context |
IDeadPropertyFactory | deadPropertyFactory | The factory to create dead properties |
Microsoft.Extensions.Options.IOptions<WebDavDispatcherClass1Options> | options | The options for the WebDAV class 1 implementation |
Properties
| Improve this Doc View SourceDefaultResponseHeaders
Gets the headers to be sent for any response
Declaration
public IReadOnlyDictionary<string, IEnumerable<string>> DefaultResponseHeaders { get; }
Property Value
Type | Description |
---|---|
IReadOnlyDictionary<String, IEnumerable<String>> |
Implements
| Improve this Doc View SourceHttpMethods
Gets the HTTP methods supported by this WebDAV class.
Declaration
public IEnumerable<string> HttpMethods { get; }
Property Value
Type | Description |
---|---|
IEnumerable<String> |
Implements
| Improve this Doc View SourceOptionsResponseHeaders
Gets the headers to be sent for a response of an OPTIONS
request
Declaration
public IReadOnlyDictionary<string, IEnumerable<string>> OptionsResponseHeaders { get; }
Property Value
Type | Description |
---|---|
IReadOnlyDictionary<String, IEnumerable<String>> |
Implements
| Improve this Doc View SourceWebDavContext
Gets the context for a request
Declaration
public IWebDavContext WebDavContext { get; }
Property Value
Type | Description |
---|---|
IWebDavContext |
Implements
Methods
| Improve this Doc View SourceCopyAsync(String, Uri, CancellationToken)
Copies from the source to the destination
Declaration
public Task<IWebDavResult> CopyAsync(string path, Uri destination, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
String | path | The source to copy |
Uri | destination | The destination to copy to |
CancellationToken | cancellationToken | The cancellation token |
Returns
Type | Description |
---|---|
Task<IWebDavResult> | The result of the operation |
Implements
| Improve this Doc View SourceDeleteAsync(String, CancellationToken)
Deletes the element at the given path
Declaration
public Task<IWebDavResult> DeleteAsync(string path, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
String | path | The path to the element to delete |
CancellationToken | cancellationToken | The cancellcation token |
Returns
Type | Description |
---|---|
Task<IWebDavResult> | The result of the operation |
Implements
| Improve this Doc View SourceGetAsync(String, CancellationToken)
Gets the element at the given path
Declaration
public Task<IWebDavResult> GetAsync(string path, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
String | path | The path to the element to get |
CancellationToken | cancellationToken | The cancellcation token |
Returns
Type | Description |
---|---|
Task<IWebDavResult> | The result of the operation |
Implements
| Improve this Doc View SourceGetProperties(IEntry)
Gets the properties for an entry that are supported by this WebDAV class
Declaration
public IEnumerable<IUntypedReadableProperty> GetProperties(IEntry entry)
Parameters
Type | Name | Description |
---|---|---|
IEntry | entry | The entry to create the properties for |
Returns
Type | Description |
---|---|
IEnumerable<IUntypedReadableProperty> | The properties that are to be used for the given entry |
Implements
| Improve this Doc View SourceHeadAsync(String, CancellationToken)
Gets the information about an element at the given path
Declaration
public Task<IWebDavResult> HeadAsync(string path, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
String | path | The path to the element to get the information for |
CancellationToken | cancellationToken | The cancellcation token |
Returns
Type | Description |
---|---|
Task<IWebDavResult> | The result of the operation |
Implements
| Improve this Doc View SourceMkColAsync(String, CancellationToken)
Creates a collection at the given path
Declaration
public Task<IWebDavResult> MkColAsync(string path, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
String | path | The path to the collection to create |
CancellationToken | cancellationToken | The cancellcation token |
Returns
Type | Description |
---|---|
Task<IWebDavResult> | The result of the operation |
Implements
| Improve this Doc View SourceMoveAsync(String, Uri, CancellationToken)
Moves from the source to the destination
Declaration
public Task<IWebDavResult> MoveAsync(string path, Uri destination, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
String | path | The source to move |
Uri | destination | The destination to move to |
CancellationToken | cancellationToken | The cancellation token |
Returns
Type | Description |
---|---|
Task<IWebDavResult> | The result of the operation |
Implements
| Improve this Doc View SourceOptionsAsync(String, CancellationToken)
Queries the options for a given path.
Declaration
public Task<IWebDavResult> OptionsAsync(string path, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
String | path | The root-relataive file system path to query the options for |
CancellationToken | cancellationToken | The cancellcation token |
Returns
Type | Description |
---|---|
Task<IWebDavResult> | The result of the operation |
Implements
Remarks
This is used to identify the WebDAV capabilities at a given URL.
PropFindAsync(String, propfind, CancellationToken)
Queries properties (dead or live) for a given path.
Declaration
public Task<IWebDavResult> PropFindAsync(string path, propfind request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
String | path | The path to query the properties for |
propfind | request | Some information about the properties to query |
CancellationToken | cancellationToken | The cancellcation token |
Returns
Type | Description |
---|---|
Task<IWebDavResult> | The result of the operation |
Implements
| Improve this Doc View SourcePropPatchAsync(String, propertyupdate, CancellationToken)
Patches (sets or removes) properties from the given path
Declaration
public Task<IWebDavResult> PropPatchAsync(string path, propertyupdate request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
String | path | The path to patch the properties for |
propertyupdate | request | The properties to patch |
CancellationToken | cancellationToken | The cancellcation token |
Returns
Type | Description |
---|---|
Task<IWebDavResult> | The result of the operation |
Implements
| Improve this Doc View SourcePutAsync(String, Stream, CancellationToken)
Creates or updates a document at the given path
Declaration
public Task<IWebDavResult> PutAsync(string path, Stream data, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
String | path | The path where to create or update the document |
Stream | data | The data to write to the new or existing document |
CancellationToken | cancellationToken | The cancellcation token |
Returns
Type | Description |
---|---|
Task<IWebDavResult> | The result of the operation |
Implements
| Improve this Doc View SourceTryCreateDeadProperty(IPropertyStore, IEntry, XName, out IDeadProperty)
Tries to create a well known dead property required/used by this WebDAV class implementation
Declaration
public bool TryCreateDeadProperty(IPropertyStore store, IEntry entry, XName name, out IDeadProperty deadProperty)
Parameters
Type | Name | Description |
---|---|---|
IPropertyStore | store | The property store to store this property |
IEntry | entry | The entry to instantiate this property for |
XName | name | The name of the dead property to create |
IDeadProperty | deadProperty | The created dead property if this function returned true. |
Returns
Type | Description |
---|---|
Boolean | true when this function could handle the creation of the well known dead property with the given name |