Namespace: ITHit.WebDAV.Server.Class2
Exception | Condition |
---|---|
LockedException | This folder was locked. Client did not provide the lock token. |
NeedPrivilegesException | The user doesn't have enough privileges. |
InsufficientStorageException | Quota limit is reached. |
MultistatusException | Errors has occured during processing of the subtree. |
DavException | In other cases. |
If this lock included more than one hierarchy item, the lock is removed from all items included in the lock.
The code below is part of 'WebDAVServer.NtfsStorage' sample provided with the SDK.
public void Unlock(string lockToken) { var explicitLocks = getExplicitLocks(); int i = explicitLocks.FindIndex(li => li.LockToken == lockToken); if (i >= 0) { explicitLocks.RemoveAt(i); } else { throw new DavException("The lock could not be found.", DavStatus.PRECONDITION_FAILED); } saveLocks(); }