Disk Arbitration

RSS for tag

Provide mechanisms for registering for mount/unmount notification and blocking mount/unmount events using Disk Arbitration.

DiskArbitration Documentation

Posts under Disk Arbitration tag

4 Posts
Sort by:
Post not yet marked as solved
3 Replies
251 Views
I need to clarify type of USB device. I donn't see differences between USB flash stick and USB HDD. On Windows and Linux I can find out type of device, but I don't know any approches to find out that on macOS. Can you help me?
Posted
by vim2k.
Last updated
.
Post not yet marked as solved
2 Replies
338 Views
How do I programmatically mount an APFS encrypted device? If it is a normal device, Can be mounted using DADiskMount of Disk Arbitration Framework. However, in the case of APFS encryption, it will not be mounted even if DADiskMount is used in the same way. I think it requires a password to mount. Please tell me if there is a way to programmatically mount the APFS encrypted device. The language I'm currently using is Objective-C.
Posted Last updated
.
Post not yet marked as solved
1 Replies
574 Views
Hi, i am working on a swift package library that gets information about all the disks connected to the mac and displays it organised into a tree structure, including the non-mounted storage devices attached to the machine. My question is how can i get informations about unmounted devices like: The amount of free space (when possible) of a partition or an APFS container The space occupied by a single APFS volume I am already using a combination of IOKit and Disk Arbitration for my library and i don't see this information anywhere in those frameworks, including the description dictionaries provided by Disk Arbitration. Instead the terminal command diskutil info -plist [volume/partition BSD name here] gives me this info, but i can't just use it's output in my swift program (and obtaining it via a process object for example) since it doesn't work with the app sandbox, so i am looking for a sandbox-friendly way using just the API. I hope you can help me figure this out, really any help is appreciated, thank you for your attention.
Posted Last updated
.
Post not yet marked as solved
1 Replies
502 Views
Hi, i have made some code in Swift that allows me to get a list of the storage disks and the relative partitions present in a mac (everything made using the IOKit api), this of course includes the APFS containers that are managed by the OS as separate storage devices. To have a proper representation of the partitions tree in my code i need to know which are the actual partitions housing a given APFS container. I have tried to look for this information on documentation and on the internet, then into the IORegistry (using the registry explorer app) and searching for this info into the description dictionaries provided by Disk arbitration but so far no luck, even by comparing the UUIDs. In IORegistry explorer in the IOService plane I can also see that the APFS Container in my mac's ssd is listed as a sub-node of it's physical storage a partition, but since i am using an IOIterator object to scan the IORegistry i have no idea of how i should look into sub-nodes for a given node. Also i think that some particular storage configurations might have an APFS container split across multiple physical storage devices, in fact the diskutil list -plist command shows the physical store for each APFS containers as an array in the plist output, so the child approach might not be effective there. So how can i do this? I am doing all of this stuff because i am working to a sandbox-friendly open source swift package for macOS apps to easily get a complete tree structure of disks and partitions, in a similar fashion to the above mentioned diskutil list -plist command, my goal is actually to have the exact same structure provided by that command, with the same info.
Posted Last updated
.