checkAccess(to:requestedAccess:replyHandler:)
Checks whether the file system allows access to the given item.
Declaration
func checkAccess(to theItem: FSItem, requestedAccess access: FSVolume.AccessMask, replyHandler reply: @escaping @Sendable (Bool, (any Error)?) -> Void)func checkAccess(to theItem: FSItem, requestedAccess access: FSVolume.AccessMask) async throws -> BoolParameters
- theItem:
The item for which to check access.
- access:
A mask indicating a set of access types for which to check.
- reply:
A block or closure to indicate success or failure. If the access check succeeds, pass a Boolean value to indicate whether the file system grants access, followed by a
nilerror. If the access check fails, pass the relevant error as the second parameter; FSKit ignores the Boolean parameter in this case. For anasyncSwift implementation, there’s no reply handler; simply return theBoolor throw an error.