pub unsafe trait FSVolumeAccessCheckOperations: NSObjectProtocol {
// Provided methods
unsafe fn isAccessCheckInhibited(&self) -> bool
where Self: Sized + Message { ... }
unsafe fn setAccessCheckInhibited(&self, access_check_inhibited: bool)
where Self: Sized + Message { ... }
unsafe fn checkAccessToItem_requestedAccess_replyHandler(
&self,
the_item: &FSItem,
access: FSAccessMask,
reply: &DynBlock<dyn Fn(Bool, *mut NSError)>,
)
where Self: Sized + Message { ... }
}
Available on crate feature
FSVolume
only.Expand description
Methods and properties implemented by volumes that want to enforce access check operations.
See also Apple’s documentation
Provided Methods§
Sourceunsafe fn isAccessCheckInhibited(&self) -> bool
unsafe fn isAccessCheckInhibited(&self) -> bool
A Boolean value that instructs FSKit not to call this protocol’s methods, even if the volume conforms to it.
FSKit reads this value after the file system replies to the loadResource
message.
Changing the returned value during the runtime of the volume has no effect.
Sourceunsafe fn setAccessCheckInhibited(&self, access_check_inhibited: bool)
unsafe fn setAccessCheckInhibited(&self, access_check_inhibited: bool)
Setter for isAccessCheckInhibited
.
Sourceunsafe fn checkAccessToItem_requestedAccess_replyHandler(
&self,
the_item: &FSItem,
access: FSAccessMask,
reply: &DynBlock<dyn Fn(Bool, *mut NSError)>,
)
Available on crate features FSItem
and block2
only.
unsafe fn checkAccessToItem_requestedAccess_replyHandler( &self, the_item: &FSItem, access: FSAccessMask, reply: &DynBlock<dyn Fn(Bool, *mut NSError)>, )
FSItem
and block2
only.Checks whether the file system allows access to the given item.
- Parameters:
- 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
nil
error. If the access check fails, pass the relevant error as the second parameter; FSKit ignores the Boolean parameter in this case. For anasync
Swift implementation, there’s no reply handler; simply return theBool
or throw an error.