pub unsafe trait FSVolumeRenameOperations: NSObjectProtocol {
// Provided methods
unsafe fn isVolumeRenameInhibited(&self) -> bool
where Self: Sized + Message { ... }
unsafe fn setVolumeRenameInhibited(&self, volume_rename_inhibited: bool)
where Self: Sized + Message { ... }
unsafe fn setVolumeName_replyHandler(
&self,
name: &FSFileName,
reply: &DynBlock<dyn Fn(*mut FSFileName, *mut NSError)>,
)
where Self: Sized + Message { ... }
}Available on crate feature
FSVolume only.Expand description
Methods and properties implemented by volumes that support renaming the volume.
See also Apple’s documentation
Provided Methods§
Sourceunsafe fn isVolumeRenameInhibited(&self) -> bool
unsafe fn isVolumeRenameInhibited(&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 setVolumeRenameInhibited(&self, volume_rename_inhibited: bool)
unsafe fn setVolumeRenameInhibited(&self, volume_rename_inhibited: bool)
Setter for isVolumeRenameInhibited.
Sourceunsafe fn setVolumeName_replyHandler(
&self,
name: &FSFileName,
reply: &DynBlock<dyn Fn(*mut FSFileName, *mut NSError)>,
)
Available on crate features FSFileName and block2 only.
unsafe fn setVolumeName_replyHandler( &self, name: &FSFileName, reply: &DynBlock<dyn Fn(*mut FSFileName, *mut NSError)>, )
FSFileName and block2 only.Sets a new name for the volume.
- Parameters:
- name: The new volume name.
- reply: A block or closure to indicate success or failure. If renaming succeeds, pass an
FSFileNameof the new volume name and anilerror. If renaming fails, pass the relevant error as the second parameter; FSKit ignores anyFSFileNamein this case. For anasyncSwift implementation, there’s no reply handler; simply return theFSFileNameor throw an error.