0

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?

SaudiSheep
  • 35
  • 6
  • Use `FileManager`'s `mountedVolumeURLs` to list all the URLs of the removable and find the path that starts with 'Volumes.' – El Tomato May 11 '21 at 06:12
  • 1
    There's this [answer using the command line](https://apple.stackexchange.com/a/335223/122145) and also an [Objective-C example](https://stackoverflow.com/a/1785524/2227743). – Eric Aya May 11 '21 at 07:28

0 Answers0