• 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: Get HFS Path of POSIX Path?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Get HFS Path of POSIX Path?


  • Subject: Re: Get HFS Path of POSIX Path?
  • From: Paul Berkowitz <email@hidden>
  • Date: Fri, 24 Sep 2004 07:21:47 -0700

On 9/24/04 7:06 AM, "Johnny AppleScript" <email@hidden> wrote:

>
> I tried to search my own archives and samples before asking; isn't there a
> method, other than a text replacement subroutine, to get the HFS path to an
> object from its POSIX equivalent?
>
> have: "/Users/Library/Folder/Object
> need: ":volumename:Users:Library:Folder:object"
> where: Users directory is on a volume other than startup volume

POSIX file "/Users/Library/Folder/Object"

    will compile to

file "Disk:Users:Library:Folder:Object"

(It's in the Standard Additions.) You'll find that in order to use it that
that 'file' thing doesn't do much and needs instead:

POSIX file "/Users/Library/Folder/Object" as alias
--> alias "Disk:Users:Library:Folder:Object"

or

POSIX file "/Users/Library/Folder/Object" as Unicode text
--> "Disk:Users:Library:Folder:Object"


(The shorthand you've been using of omitting the startup disk in Mac (colon)
paths will probably stop working someday.)

>
> I'm finding some problems with file paths when the UNIX path leads (via
> symlink or otherwise) to another volume when using text replacement for
> paths (which works most of the time, otherwise).

This method will work even when the POSIX path starts "/Volumes/" etc.


--
Paul Berkowitz


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Get HFS Path of POSIX Path?
      • From: Emmanuel <email@hidden>
    • Re: Get HFS Path of POSIX Path?
      • From: Johnny AppleScript <email@hidden>
References: 
 >Get HFS Path of POSIX Path? (From: Johnny AppleScript <email@hidden>)

  • Prev by Date: Get HFS Path of POSIX Path?
  • Next by Date: Re: Get HFS Path of POSIX Path?
  • Previous by thread: Get HFS Path of POSIX Path?
  • Next by thread: Re: Get HFS Path of POSIX Path?
  • Index(es):
    • Date
    • Thread