Detecting a remote volume
Detecting a remote volume
- Subject: Detecting a remote volume
- From: Knut Lorenzen <email@hidden>
- Date: Mon, 2 Aug 2010 21:26:36 +0200
Dear List,
my app should copy a few files to a remote (afp://) volume, hence it notifies the user if there is no connection, using NSFileManager's fileExistsAtPath: method.
However, if the user connects to the Server using Finder's "Connect As...", NSFileManager's fileExistsAtPath: @"/Volumes/Mailbackup" still returns NO. It only works, i.e. returns YES, if the user actually clicks on the "Mailbackup" folder in Finder. There is no entry in "/Volumes" either, until the user clicks.
Instead of fileExistsAtPath: I have tried several other methods (like isReadableFileAtPath: or changeCurrentDirectoryPath:) as well as NSWorkspace's mountedLocalVolumePaths to no avail. It only works after actually opening the folder in Finder.
Is there a way to update NSFileManager or NSWorkspace without opening the folder in question?
Knut
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden