• 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: More newbie queries: paths
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: More newbie queries: paths


  • Subject: Re: More newbie queries: paths
  • From: Chris Page <email@hidden>
  • Date: Fri, 3 May 2002 15:51:54 -0700

On Friday, May 3, 2002, at 12:10 , garbanzito wrote:

in any case, one will still need extra code if a script might be handed "~/foo" from an external source.

Just to be clear: "~" is not part of the POSIX path definition (and by "POSIX path" I mean the actual POSIX definition of a path, not the AppleScript "POSIX path" type). It is a special character handled by Unix command line shells. It gets replaced with the path to the current user folder to construct a POSIX path before a command sees it.

If you want to handle "~", then you're responsible for implementing this behavior, just like any other shell program. Otherwise, just tell your users that you are not a shell and they need to expand "~" -- or any other special symbols, such as "$FOO" environment variables -- before handing it to your script.

--
Chris Page - Mac OS Lead, Palm Desktop - Palm, Inc.

The other, other Chris.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: More newbie queries: paths
      • From: John W Baxter <email@hidden>
References: 
 >Re: More newbie queries: paths (From: garbanzito <email@hidden>)

  • Prev by Date: Re: offset with spaces confusion
  • Next by Date: Re: Finder Whose by Modification date
  • Previous by thread: Re: More newbie queries: paths
  • Next by thread: Re: More newbie queries: paths
  • Index(es):
    • Date
    • Thread