Disk Arbitration

RSS for tag

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

Posts under Disk Arbitration tag

23 Posts

Post

Replies

Boosts

Views

Activity

[DiskArbitration] Is it possible to get the state of a Session?
It does not seem to be documented but, according to the DiskArbitration source code from Darwin, if an approval callback does not return after 10 seconds, the session state is set to timeout and further approval callbacks are never called anymore. Based on the source code, it does not seem possible but as I may be missing something: [Q] Is there a way to get/set the state of a DASessionRef or DAApprovalSessionRef? Would there be some kind of notification mechanism to be informed that a session has been set as timed out?
1
0
1.2k
Sep ’22
How do I programmatically mount an APFS encrypted device?
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.
2
0
1.9k
Dec ’21
[DiskArbitration] Is it possible to get the state of a Session?
It does not seem to be documented but, according to the DiskArbitration source code from Darwin, if an approval callback does not return after 10 seconds, the session state is set to timeout and further approval callbacks are never called anymore. Based on the source code, it does not seem possible but as I may be missing something: [Q] Is there a way to get/set the state of a DASessionRef or DAApprovalSessionRef? Would there be some kind of notification mechanism to be informed that a session has been set as timed out?
Replies
1
Boosts
0
Views
1.2k
Activity
Sep ’22
Differences between USB Flash and USB HDD
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?
Replies
3
Boosts
0
Views
1.1k
Activity
Jan ’22
How do I programmatically mount an APFS encrypted device?
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.
Replies
2
Boosts
0
Views
1.9k
Activity
Dec ’21