Re: Difference between "as alias" and "as file spec
Re: Difference between "as alias" and "as file spec
- Subject: Re: Difference between "as alias" and "as file spec
- From: email@hidden
- Date: Wed, 12 Dec 2001 23:09:55 -0500
On Wed, 12 Dec 2001 15:13:21 -0800
Chris Page <email@hidden>
>
nigh on 2001-12-12 1:46 PM, Greg Back at email@hidden wrote:
>
>
> The subject says it all. i've seen both forms used, and i'd like to know the
>
> difference. I think this has been asked before, but i couldn't find it on
>
> the archives. I also looked in the ASLG, but couldn't find anything. I use
>
> the two interchangeably and have never run into any problems. Would anyone
>
> like to satisfy my never-ending curiosity by relating an answer to me?
[ Lots of good stuff deleted. ]
And to add one important feature for scripters, a file specification
can refer to a file that doesn't exist yet. The disk and folders
have to all exist, but the file doesn't have to. That makes the
file specification (or its OS X replacement the fileURL) the natural
thing to use when creating an output file.
Then, there's the 'file "Disk:path:name"' reference, which isn't a
file specification exactly, but an object reference. As such, its
like 'window 1' or 'document "MyFile"' or 'application "Microsoft Word"':
It isn't really resolved to a concrete thing, but passed to the target
application. And AppleScript itself can't resolve it, so
set f to file "Mydisk:"
gives an error.
I echo the concerns some people had about the fileURL being problematic
if you rename the disk or the folders. That's always been something
that makes the Mac file system more user friendly: the user owns the
disk, file and folder names, and can change them if desired.
What we need is the modern replacement for a file system specification,
which would be an object that bundles together an alias to the enclosing
folder and the name of the potential file. We'd replace the evil volume
numbers and folder numbers, but still have the same functionality.
Of course, I realize its WAY too late to ask for a change to such a
fundamental operating system type. I'd just as well say, "Maybe Bill
Gates should have finished college."
--
Scott Norton Phone: +1-703-299-1656
DTI Associates, Inc. Fax: +1-703-706-0476
2920 South Glebe Road Internet: email@hidden
Arlington, VA 22206-2768 or email@hidden