im trying to eject/unmount a usb drive in swift i think i have to use fileManager.unmountVolume
let urlString = "/Volumes/UNTITLED/".addingPercentEncoding(withAllowedCharacters: .urlUserAllowed)
let url = URL(string: urlString!)
fileManager.unmountVolume(at: url!, options: FileManager.UnmountOptions.init(), completionHandler: {(_) in})
wen no drive is plugged in i get no output but wen a drive is plugged in i get CFURLCopyResourcePropertyForKey failed because it was passed an URL which has no scheme