4.4 Locks
The path and token can be used to identify the lock in fs-access-add-lock-token!, fs-lock! and fs-unlock! operations.
| |||||||||||||||||||||||||||||||||||||||||||||||||
fs : fs? | |||||||||||||||||||||||||||||||||||||||||||||||||
path : path-string? | |||||||||||||||||||||||||||||||||||||||||||||||||
token : (or/c bytes? #f) = #f | |||||||||||||||||||||||||||||||||||||||||||||||||
comment : (or/c string? #f) = #f | |||||||||||||||||||||||||||||||||||||||||||||||||
expiration-time : (or/c time? #f) = #f | |||||||||||||||||||||||||||||||||||||||||||||||||
current-rev : (or/c exact-nonnegative-integer? #f) = #f | |||||||||||||||||||||||||||||||||||||||||||||||||
steal? : any/c = #f |
The token uniquely identifies the lock. If it is not specified, a fresh token is generated for the lock. If it is specified and a lock with that token already exists, it must be installed at the same path as the new lock.
The comment is purely descriptive and need not be specified.
An expiration-time is optional. If specified, it must be a SRFI-19 UTC time or a duration. A duration is added to the current time to produce a value to be passed to the Subversion library. Locks without expiration time never expire.
If a current-rev is specified, the lock operation only succeeds if the path hasn’t been modified or deleted since that revision.
If steal? is not #f, any existing lock at the given path is removed and replaced by a new one.
If token is #f, the lock at the given path is broken regardless of its owner.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fs : fs? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
path : path-string? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
thunk : (-> any) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
token : (or/c bytes? #f) = #f | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
comment : (or/c string? #f) = #f | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
expiration-time : (or/c time? #f) = #f | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
current-rev : (or/c exact-nonnegative-integer? #f) = #f | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
steal? : any/c = #f |
When the lock is established, its token is also added to the current access context of the file system.
See fs-lock! for the precise meaning of the keyword arguments.