Contents

sharedLock

Indicates that opening the file atomically obtains a shared lock on the file.

Declaration

static var sharedLock: FileDescriptor.OpenOptions { get }

Mentioned in

Discussion

Setting this option or the exclusiveLock option obtains a lock with flock(2) semantics. If you’re creating a file using the create option, the request for the lock always succeeds except on file systems that don’t support locking.

The corresponding C constant is O_SHLOCK.

See Also

Specifying Options