dontWatchMyProfile
dontWatchMyProfile

Reputation: 46370

What to do if the user drags a symbolic link or Alias into iTunes File Sharing?

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

Answers (1)

Deepak Danduprolu
Deepak Danduprolu

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

Related Questions