Hello,
I am trying to get a FileHandle
for a specific file on an external hard disk.
My app is sandboxed and in order to be able to get a FileHandle
I am showing a NSOpenPanel
so the user can grant permission to access this disk.
After the user has granted permissions, I use the following code to get the handle:
guard let readDescriptor = try? FileDescriptor.open(readUrl.path, FileDescriptor.AccessMode.readWrite) else { return }
I get the following error when this code runs:
The operation couldn’t be completed. Operation not permitted
What I don't understand is the fact that this code only fails on disks that have the MS-DOS file system. I have tested various USB sticks, SD cards and external hard drives. It works fine for the APFS, but once I format the device as MS-DOS, the code fails.
Has anyone any idea why that is?
Regards, Sascha