Click or drag to resize

IHierarchyItemAsyncDeleteAsync Method

IT Hit WebDAV Classes Reference
Deletes this item.

Namespace:  ITHit.WebDAV.Server
Assembly:  ITHit.WebDAV.Server (in ITHit.WebDAV.Server.dll) Version: 11.3.10719
Syntax
Task DeleteAsync(
	MultistatusException multistatus
)

Task DeleteAsync(
	MultistatusException multistatus
)

Parameters

multistatus
Type: ITHit.WebDAV.ServerMultistatusException
If some items fail to delete but operation in whole shall be continued, add information about the error into multistatus using AddInnerException(String, DavException).

Return Value

Type: Task
.
Exceptions
ExceptionCondition
LockedExceptionThis item or its parent was locked and client did not provide lock token.
NeedPrivilegesExceptionThe user doesn't have enough privileges.
InsufficientStorageExceptionQuota limit is reached.
MultistatusExceptionErrors has occured during processing of item in the subtree and whole operation shall be aborted.
DavExceptionIn other cases. Possible status value is CONFLICT if destination folder doesn't exist.
Examples

The code below is part of 'WebDAVServer.FileSystemStorage.AspNet' C# & VB samples provided with the SDK.

public override async Task DeleteAsync(MultistatusException multistatus)
{
    await RequireHasTokenAsync();
    if (FileSystemInfoExtension.IsUsingFileSystemAttribute)
    {
        await fileSystemInfo.DeleteExtendedAttributes();
    }

    fileSystemInfo.Delete();
    await context.socketService.NotifyDeletedAsync(Path);
}
See Also