Initializer

init(path:)

Initializes an NSDistributedLock object to use as the lock the file-system entry specified by a given path.

Declaration

init?(path: String)

Parameters

aPath

All of aPath up to the last component itself must exist. You can use FileManager to create (and set permissions) for any nonexistent intermediate directories.

Return Value

An NSDistributedLock object initialized to use as the locking object the file-system entry specified by aPath.

Discussion

For applications to use the lock, aPath must be accessible to—and writable by—all hosts on which the applications might be running.

See Also