Re: symlinks
Re: symlinks
- Subject: Re: symlinks
- From: Shane Stanley <email@hidden>
- Date: Sat, 14 Aug 2010 09:28:56 +1000
- Thread-topic: symlinks
On 14/8/10 7:36 AM, "Luther Fuller" <email@hidden> wrote:
> A search turned up this recent remark:
> On 10/07/2010, at 9:55 PM, Shane Stanley wrote:
>
> For some reason can't use "POSIX file" in a specifier -- you have to coerce:
>
> set hfsPath to (((POSIXPath as text) as POSIX file) as text)
If you read the whole post, you'll see that it's in the context of
AppleScriptObjC, and how it requires coercions where normal AS requires
specifiers.
>
> After experimenting with this for awhile, I found that 'hfsPath' isn't really
> an hfs path.
> I've broken the example into steps, as follows:
>
> alias "OS_X:Users:lutherfuller:Desktop:symlink Testing:TEST-FOLDER"
> set posixPath to (quoted form of (POSIX path of the result))
Why "quoted form"? Cut that out and you will end up with an alias.
> Surely, there is a simple way to convert a valid posix path to an alias, but I
> haven't found it yet.
> In other words, (f as alias) always errors ... at least for me!
Use alias as a specifier, not a coercion:
set posixPath to "Macintosh HD:Users:shane:Desktop:Test.png"
alias posixPath --> alias "Macintosh HD:Users:shane:Desktop:Test.png"
--
Shane Stanley <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden
References: | |
| >Re: symlinks (From: Luther Fuller <email@hidden>) |