Re: Get HFS Path of POSIX Path?
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