FSBlockDeviceResource
A resource that represents a block storage disk partition.
Declaration
class FSBlockDeviceResourceOverview
A FSBlockDeviceResource can exist in either a proxied or nonproxied version. Only the fskitd daemon creates “real” (nonproxied) instances of this class. Client applications and daemons create proxy objects for requests, and fskitd opens the underlying device during the processing of the request.
This class wraps a file descriptor for a disk device or partition. Its fundamental identifier is the BSD disk name (bsdName) for the underlying IOMedia object. However, FSBlockDeviceResource doesn’t expose the underlying file descriptor. Instead, it provides accessor methods that can read from and write to the partition, either directly or using the kernel buffer cache.
When you use a FSBlockDeviceResource, your file system implementation also conforms to a maintenance operation protocol. These protocols add support for checking, repairing, and optionally formatting file systems. The system doesn’t mount block device file systems until they pass a file system check. For an FSUnaryFileSystem that uses FSBlockDeviceResource, conform to FSManageableResourceMaintenanceOperations.
Topics
Accessing resource properties
Reading and writing data
read(into:startingAt:length:)read(into:startingAt:length:)read(into:startingAt:length:completionHandler:)write(from:startingAt:length:)write(from:startingAt:length:)write(from:startingAt:length:completionHandler:)