pub unsafe trait FSFileSystemBase: NSObjectProtocol {
// Provided methods
unsafe fn containerStatus(&self) -> Retained<FSContainerStatus>
where Self: Sized + Message { ... }
unsafe fn setContainerStatus(&self, container_status: &FSContainerStatus)
where Self: Sized + Message { ... }
unsafe fn wipeResource_completionHandler(
&self,
resource: &FSBlockDeviceResource,
completion: &DynBlock<dyn Fn(*mut NSError)>,
)
where Self: Sized + Message { ... }
}FSFileSystemBase only.Expand description
A protocol containing functionality supplied by FSKit to file system implementations.
Both FSFileSystem and FSUnaryFileSystem conform to this protocol.
See also Apple’s documentation
Provided Methods§
Sourceunsafe fn containerStatus(&self) -> Retained<FSContainerStatus>
Available on crate feature FSContainer only.
unsafe fn containerStatus(&self) -> Retained<FSContainerStatus>
FSContainer only.The status of the file system container, indicating its readiness and activity.
A file system container starts in the FSContainerState/notReady state, and then transitions to the other values of the FSContainerState enumeration.
The following diagram illustrates the possible state transitions.
Your file system implementation updates this property as it changes state. Many events and operations may trigger a state transition, and some transitions depend on a specific file system’s design.
When using FSBlockDeviceResource, implement the following common state transitions:
- Calling
loadResourcetransitions the state out ofFSContainerState/notReady. For all block device file systems, this operation changes the state to eitherFSContainerState/readyorFSContainerState/blocked. - Calling
unloadResourcetransitions to theFSContainerState/notReadystate, as does device termination. - Transitioning from
FSContainerState/blockedtoFSContainerState/readyoccurs as a result of resolving the underlying block favorably. - Transitioning from
FSContainerState/readytoFSContainerState/blockedis unusal, but valid. - Transitioning between
FSContainerState/readyandFSContainerState/activecan result from maintenance operations such asFSManageableResourceMaintenanceOperations/startCheckWithTask:options:error:. For aFSUnaryFileSystem, this transition can also occur when activating or deactivating the container’s single volume.
Sourceunsafe fn setContainerStatus(&self, container_status: &FSContainerStatus)
Available on crate feature FSContainer only.
unsafe fn setContainerStatus(&self, container_status: &FSContainerStatus)
FSContainer only.Setter for containerStatus.
This is copied when set.
Sourceunsafe fn wipeResource_completionHandler(
&self,
resource: &FSBlockDeviceResource,
completion: &DynBlock<dyn Fn(*mut NSError)>,
)
Available on crate features FSResource and block2 only.
unsafe fn wipeResource_completionHandler( &self, resource: &FSBlockDeviceResource, completion: &DynBlock<dyn Fn(*mut NSError)>, )
FSResource and block2 only.Wipes existing file systems on the specified resource.
This method wraps the wipefs functionality from libutil.
For more information, see the man page for wipefs.
- Parameters:
- resource: The
FSBlockDeviceResourceto wipe. - completion: A block or closure that executes after the wipe operation completes. The completion handler receives a single parameter indicating any error that occurs during the operation. If the value is
nil, the wipe operation succeeded.
Trait Implementations§
Source§impl ProtocolType for dyn FSFileSystemBase
impl ProtocolType for dyn FSFileSystemBase
impl<T> ImplementedBy<T> for dyn FSFileSystemBase
Implementations on Foreign Types§
impl<T> FSFileSystemBase for ProtocolObject<T>where
T: ?Sized + FSFileSystemBase,
Implementors§
impl FSFileSystemBase for FSFileSystem
FSFileSystem only.impl FSFileSystemBase for FSUnaryFileSystem
FSUnaryFileSystem only.