"~" vs. "POSIX file"
"~" vs. "POSIX file"
- Subject: "~" vs. "POSIX file"
- From: Christopher Nebel <email@hidden>
- Date: Tue, 24 Oct 2006 13:10:28 -0700
On Oct 24, 2006, at 12:35 AM, Philip Aker wrote:
Anyway, my indirect point was that AppleScript ought to be able to
do tilde expansion on a POSIX file cast.
POSIX file "~/Desktop/some.txt"
--> file ":~:Desktop:some.txt"
I'd point out that other scripting languages, even ones that grew up
on Unix, do not support that, and they don't support it because "~"
isn't actually part of POSIX path syntax. For instance, in Perl you'd
say
"$ENV{'HOME'}/Desktop/some.text"
The equivalent in AppleScript would be
POSIX file ((system attribute "HOME") & "/Desktop/some.txt")
--Chris Nebel
AppleScript Engineering
_______________________________________________
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/mailman//archives/applescript-users
This email sent to email@hidden