Trait FSVolumeAccessCheckOperations

Source
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§

Source

unsafe fn isAccessCheckInhibited(&self) -> bool
where Self: Sized + Message,

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.

Source

unsafe fn setAccessCheckInhibited(&self, access_check_inhibited: bool)
where Self: Sized + Message,

Source

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 features 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 an async Swift implementation, there’s no reply handler; simply return the Bool or throw an error.

Trait Implementations§

Source§

impl ProtocolType for dyn FSVolumeAccessCheckOperations

Source§

const NAME: &'static str = "FSVolumeAccessCheckOperations"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
Source§

impl<T> ImplementedBy<T> for dyn FSVolumeAccessCheckOperations

Implementations on Foreign Types§

Source§

impl<T> FSVolumeAccessCheckOperations for ProtocolObject<T>

Implementors§