Namespace: ITHit.WebDAV.Server.Class2
Exception | Condition |
---|---|
NeedPrivilegesException | The user doesn't have enough privileges. |
DavException | In other cases. |
This property must return all locks for the item including deep locks on any of the parent folders.
The code below is part of 'WebDAVServer.NtfsStorage' sample provided with the SDK.
public IEnumerable<LockInfo> GetActiveLocks() { var eplicitLocks = getExplicitLocks(); return eplicitLocks.Select( l => new LockInfo { IsDeep = l.IsDeep, Level = l.Level, Owner = l.ClientOwner, LockRoot = l.LockRoot, TimeOut = l.Expiration == DateTime.MaxValue ? TimeSpan.MaxValue : l.Expiration - DateTime.UtcNow, Token = l.LockToken }); }