Class WebDavControllerBase
The default WebDAV controller
Inherited Members
Namespace:FubarDev.WebDavServer.AspNetCore
Assembly:FubarDev.WebDavServer.AspNetCore.dll
Syntax
public class WebDavControllerBase : ControllerBase
Constructors
| Improve this Doc View SourceWebDavControllerBase(IWebDavContext, IWebDavDispatcher, ILogger<WebDavIndirectResult>)
Initializes a new instance of the WebDavControllerBase class.
Declaration
public WebDavControllerBase(IWebDavContext context, IWebDavDispatcher dispatcher, ILogger<WebDavIndirectResult> responseLogger = null)
Parameters
| Type | Name | Description |
|---|---|---|
| IWebDavContext | context | The WebDAV request context |
| IWebDavDispatcher | dispatcher | The WebDAV HTTP method dispatcher |
| Microsoft.Extensions.Logging.ILogger<WebDavIndirectResult> | responseLogger | The logger for the WebDavIndirectResult |
Methods
| Improve this Doc View SourceCopyAsync(String, String, CancellationToken)
Handler for the COPY method
Declaration
[HttpCopy]
public Task<IActionResult> CopyAsync(string path, [FromHeader(Name = "Destination")] string destination, CancellationToken cancellationToken = null)
Parameters
| Type | Name | Description |
|---|---|---|
| String | path | The root-relative path to the source of this method |
| String | destination | The destination of the COPY operation |
| CancellationToken | cancellationToken | The cancellation token |
Returns
| Type | Description |
|---|---|
| Task<Microsoft.AspNetCore.Mvc.IActionResult> | The action result |
DeleteAsync(String, CancellationToken)
Handler for the DELETE method
Declaration
[HttpDelete]
public Task<IActionResult> DeleteAsync(string path, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| String | path | The root-relative path to the target of this method |
| CancellationToken | cancellationToken | The cancellation token |
Returns
| Type | Description |
|---|---|
| Task<Microsoft.AspNetCore.Mvc.IActionResult> | The action result |
GetAsync(String, CancellationToken)
Handler for the GET method
Declaration
[HttpGet]
public Task<IActionResult> GetAsync(string path, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| String | path | The root-relative path to the source of this method |
| CancellationToken | cancellationToken | The cancellation token |
Returns
| Type | Description |
|---|---|
| Task<Microsoft.AspNetCore.Mvc.IActionResult> | The action result |
HeadAsync(String, CancellationToken)
Handler for the HEAD method
Declaration
[HttpHead]
public Task<IActionResult> HeadAsync(string path, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| String | path | The root-relative path to the target of this method |
| CancellationToken | cancellationToken | The cancellation token |
Returns
| Type | Description |
|---|---|
| Task<Microsoft.AspNetCore.Mvc.IActionResult> | The action result |
LockAsync(String, lockinfo, CancellationToken)
Handler for the LOCK method
Declaration
[HttpLock]
public Task<IActionResult> LockAsync(string path, [FromBody] lockinfo lockinfo, CancellationToken cancellationToken = null)
Parameters
| Type | Name | Description |
|---|---|---|
| String | path | The root-relative path to the target of this method |
| lockinfo | lockinfo | The information about the requested lock |
| CancellationToken | cancellationToken | The cancellation token |
Returns
| Type | Description |
|---|---|
| Task<Microsoft.AspNetCore.Mvc.IActionResult> | The action result |
MkColAsync(String, CancellationToken)
Handler for the MKCOL method
Declaration
[HttpMkCol]
public Task<IActionResult> MkColAsync(string path, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| String | path | The root-relative path to the target of this method |
| CancellationToken | cancellationToken | The cancellation token |
Returns
| Type | Description |
|---|---|
| Task<Microsoft.AspNetCore.Mvc.IActionResult> | The action result |
MoveAsync(String, String, CancellationToken)
Handler for the MOVE method
Declaration
[HttpMove]
public Task<IActionResult> MoveAsync(string path, [FromHeader(Name = "Destination")] string destination, CancellationToken cancellationToken = null)
Parameters
| Type | Name | Description |
|---|---|---|
| String | path | The root-relative path to the source of this method |
| String | destination | The destination of the MOVE operation |
| CancellationToken | cancellationToken | The cancellation token |
Returns
| Type | Description |
|---|---|
| Task<Microsoft.AspNetCore.Mvc.IActionResult> | The action result |
PropFindAsync(String, propfind, CancellationToken)
Handler for the PROPFIND method
Declaration
[HttpPropFind]
public Task<IActionResult> PropFindAsync(string path, [FromBody] propfind request, CancellationToken cancellationToken = null)
Parameters
| Type | Name | Description |
|---|---|---|
| String | path | The root-relative path to the target of this method |
| propfind | request | The propfind request element (may be null) |
| CancellationToken | cancellationToken | The cancellation token |
Returns
| Type | Description |
|---|---|
| Task<Microsoft.AspNetCore.Mvc.IActionResult> | The action result |
PropPatchAsync(String, propertyupdate, CancellationToken)
Handler for the PROPPATCH method
Declaration
[HttpPropPatch]
public Task<IActionResult> PropPatchAsync(string path, [FromBody] propertyupdate request, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| String | path | The root-relative path to the target of this method |
| propertyupdate | request | The propertyupdate request element |
| CancellationToken | cancellationToken | The cancellation token |
Returns
| Type | Description |
|---|---|
| Task<Microsoft.AspNetCore.Mvc.IActionResult> | The action result |
PutAsync(String, CancellationToken)
Handler for the PUT method
Declaration
[HttpPut]
public Task<IActionResult> PutAsync(string path, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| String | path | The root-relative path to the target of this method |
| CancellationToken | cancellationToken | The cancellation token |
Returns
| Type | Description |
|---|---|
| Task<Microsoft.AspNetCore.Mvc.IActionResult> | The action result |
QueryOptionsAsync(String, CancellationToken)
Handler for the QUERY method
Declaration
[HttpOptions]
public Task<IActionResult> QueryOptionsAsync(string path, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| String | path | The root-relative path to the target of this method |
| CancellationToken | cancellationToken | The cancellation token |
Returns
| Type | Description |
|---|---|
| Task<Microsoft.AspNetCore.Mvc.IActionResult> | The action result |
UnlockAsync(String, String, CancellationToken)
Handler for the UNLOCK method
Declaration
[HttpUnlock]
public Task<IActionResult> UnlockAsync(string path, [FromHeader(Name = "Lock-Token")] string lockToken, CancellationToken cancellationToken = null)
Parameters
| Type | Name | Description |
|---|---|---|
| String | path | The root-relative path to the target of this method |
| String | lockToken | The token of the lock to remove |
| CancellationToken | cancellationToken | The cancellation token |
Returns
| Type | Description |
|---|---|
| Task<Microsoft.AspNetCore.Mvc.IActionResult> | The action result |