Class CopyMoveHandlerBase
The shared implementation of the COPY and MOVE handlers.
Inherited Members
Namespace:FubarDev.WebDavServer.Handlers.Impl
Assembly:FubarDev.WebDavServer.dll
Syntax
public abstract class CopyMoveHandlerBase
Constructors
| Improve this Doc View SourceCopyMoveHandlerBase(IFileSystem, IWebDavContext, ILogger)
Initializes a new instance of the CopyMoveHandlerBase class.
Declaration
protected CopyMoveHandlerBase([NotNull] IFileSystem rootFileSystem, [NotNull] IWebDavContext context, [NotNull] ILogger logger)
Parameters
Type | Name | Description |
---|---|---|
IFileSystem | rootFileSystem | The root file system |
IWebDavContext | context | The WebDAV context |
Microsoft.Extensions.Logging.ILogger | logger | The logger to use (either for COPY or MOVE) |
Properties
| Improve this Doc View SourceLogger
Gets the logger
Declaration
[NotNull]
protected ILogger Logger { get; }
Property Value
Type | Description |
---|---|
Microsoft.Extensions.Logging.ILogger |
WebDavContext
Gets the WebDAV context
Declaration
[NotNull]
protected IWebDavContext WebDavContext { get; }
Property Value
Type | Description |
---|---|
IWebDavContext |
Methods
| Improve this Doc View SourceCreateLocalTargetActions(RecursiveProcessingMode)
Create the target action implementation for local COPY or MOVE
Declaration
[NotNull]
protected abstract ITargetActions<CollectionTarget, DocumentTarget, MissingTarget> CreateLocalTargetActions(RecursiveProcessingMode mode)
Parameters
Type | Name | Description |
---|---|---|
RecursiveProcessingMode | mode | The requested processing mode (in-filesystem or cross-filesystem) |
Returns
Type | Description |
---|---|
ITargetActions<CollectionTarget, DocumentTarget, MissingTarget> | The implementation for local actions |
CreateRemoteTargetActionsAsync(Uri, CancellationToken)
Create the target action implementation for remote COPY or MOVE
Declaration
[NotNull]
[ItemCanBeNull]
protected abstract Task<IRemoteTargetActions> CreateRemoteTargetActionsAsync(Uri destinationUrl, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
Uri | destinationUrl | The destination URL |
CancellationToken | cancellationToken | The cancellcation token |
Returns
Type | Description |
---|---|
Task<IRemoteTargetActions> | The implementation for remote actions |
ExecuteAsync(String, Uri, DepthHeader, Boolean, RecursiveProcessingMode, Boolean, CancellationToken)
Executes the COPY or MOVE recursively
Declaration
protected Task<IWebDavResult> ExecuteAsync([NotNull] string sourcePath, [NotNull] Uri destination, DepthHeader depth, bool overwrite, RecursiveProcessingMode mode, bool isMove, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
String | sourcePath | The source path |
Uri | destination | The destination URI |
DepthHeader | depth | The depth |
Boolean | overwrite | Can the destination be overwritten? |
RecursiveProcessingMode | mode | The COPY mode to use |
Boolean | isMove | Is this a move operation? |
CancellationToken | cancellationToken | The cancellcation token |
Returns
Type | Description |
---|---|
Task<IWebDavResult> | The result of the operation |