• 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
Programmatically create aliases to unmounted servers?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Programmatically create aliases to unmounted servers?


  • Subject: Programmatically create aliases to unmounted servers?
  • From: "Zajkowski, James" <email@hidden>
  • Date: Tue, 24 Jan 2012 22:24:26 +0000
  • Thread-topic: Programmatically create aliases to unmounted servers?

All,

I'm looking for a way to construct an alias file (a bookmark file) with a specific but unmounted file server location.  That is, I want to put an icon on user's desktops that says "Network Space" and have it resolve to afp://ser.ver.add.ress/mount/username.

I can create an NSURL with the encoded path correctly, and I've tried to construct a bookmark file using NSURL's -bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error: and + writeBookmarkData:toURL:options:error:.  When I use a "smb" or "afp" URL I get a file that, when double clicked, opens in TextEdit with the contents of the bookmark file (that is, the URL).  I'm pretty sure my code is correct because if I change the URL to a local file I get a working bookmark file.  It also works if I construct the URL to a local path when the server is mounted (/Volumes/Server) - unmounting and opening the bookmark will re-mount the server.

I've stared at the NSURL and File Manager references and it seems like there's no way to go from a text server reference to a bookmark file.  Is there a way to make an alias without mounting the server first?

Thanks,

--Jim


_______________________________________________

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: Programmatically create aliases to unmounted servers?
      • From: Ken Thomases <email@hidden>
    • Re: Programmatically create aliases to unmounted servers?
      • From: John Joyce <email@hidden>
  • Prev by Date: Where to implement alert ?
  • Next by Date: Re: vForce Performance
  • Previous by thread: Re: Where to implement alert ?
  • Next by thread: Re: Programmatically create aliases to unmounted servers?
  • Index(es):
    • Date
    • Thread