Given the mounted volume's URL, retrieve the DMG file's URL using Swift

316 Views Asked by At

enter image description here

I have the URL of the mounted volume which is, /Volumes/Brave Browser. How can I retrieve the URL of the disk image file using Swift? As you can see from the screenshot, it's filepath is /Users/saisudheep_n/Downloads/Brave-Browser.dmg. I have tried using Disk Arbitration to retrieve disk description using DADiskCopyDescription(DADisk_Object) but it doesn't contain the dmg filepath. Is there any way to achieve this using Swift?

0

There are 0 best solutions below