Reputation: 46370
My will use iTunes File Sharing so the user can drag files easily into the Documents directory of the app, using iTunes.
I never tried this but what if the user drags an alias or symbolic link in there? What happens? I guess that iTunes is clever and actually pulls in the real file, not the symbolic link. But assuming it's not clever, how will I deal with this in my app?
How can I detect this and tell the user that he dragged garbage to the documents dir?
Upvotes: 0
Views: 226
Reputation: 44633
Use NSFileManager
' attributesOfItemAtPath:error
to get details on the file path. NSFileType
key should tell you whether its a symlink or not.
Upvotes: 1