hdiutil command line could get a list of disk images, may I ask if there is any API performing the same? thank you.
liz@macos-12 ~ % hdiutil info
framework : 623.100.1
driver : 623.100.1
================================================
image-path : /Users/liz/Downloads/Skype-8.90.0.407.dmg
image-alias : /Users/liz/Downloads/Skype-8.90.0.407.dmg
shadow-path : <none>
icon-path : <none>
image-type : read-only disk image
system-image : false
blockcount : 2048080
blocksize : 512
writeable : false
autodiskmount : TRUE
removable : TRUE
image-encrypted : false
mounting user : liz
mounting mode : <unknown>
process ID : 20600
framework name : DiskImages2
/dev/disk2 GUID_partition_scheme
/dev/disk2s1 <GUID> /Volumes/Skype
is any API performing the same?
There is not. hdiutil is part of the disk images infrastructure and uses an internal mechanism to get this info.
If you need this info I recommend that your spawn hdiutil to get it. Normally I recommendation against such shenanigans but in this case hdutil explicitly supports it via the -plist option, which generates machine-readable output.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"