• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Detecting a remote volume
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Detecting a remote volume


  • Subject: Re: Detecting a remote volume
  • From: Ken Thomases <email@hidden>
  • Date: Mon, 2 Aug 2010 14:58:39 -0500

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 (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

  • Follow-Ups:
    • Re: Detecting a remote volume
      • From: Knut Lorenzen <email@hidden>
References: 
 >Detecting a remote volume (From: Knut Lorenzen <email@hidden>)

  • Prev by Date: Detecting a remote volume
  • Next by Date: Re: Using an NSToolbar in a sheet
  • Previous by thread: Detecting a remote volume
  • Next by thread: Re: Detecting a remote volume
  • Index(es):
    • Date
    • Thread