On Aug 2, 2010, at 2:26 PM, Knut Lorenzen wrote: > 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.
> Is there a way to update NSFileManager or NSWorkspace without opening the > folder in question? They are not out of date, so there's nothing to update them about. Connecting to the server is not the same as mounting a volume from it. I can reproduce the symptoms you describe, but I also clearly see that no volume is mounted just upon completing the Connect As step. If I click on one of the volumes shared by the server, it mounts, it appears on my desktop (that's configureable in Finder's preferences), the entry for the server in the Shared section of the sidebar gains the eject button and moves to the top of the list, the volume in the list of shares served from the server gains the eject icon, etc. All of those are indications that nothing was mounted before I clicked and was after. If you need something to be mounted, you can mount it yourself using FSMountServerVolumeSync(). Otherwise, you can just wait for the user to actually mount a volume instead of just connecting to a server. Regards, Ken _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com