Wednesday, March 29, 2017
  • Index
  •  » OS X Finder
  •  » What does "alias" mean in reference to a file, folder or application?

#1 2005-10-12 07:01:24 am

julifos
Administrator
From: MalasaƱa, Madrid
Registered: 2002-11-20
Posts: 2014

What does "alias" mean in reference to a file, folder or application?

There are several ways in AppleScript to reference a file:

Applescript:

alias "path:to:file" --> an alias path
"path:to:file" --> a simple path
file "path:to:file" --> a file reference
"/to/file" --> a POSIX path

Some applications (eg, the Finder, except for the POSIX path) will accept all these file specifications as valid ways to target a file, but alias will be the safest way to pass the file specification, since it implies that the file does exist. For example, the "simple path" is really a chunk of text, and the existence of the file is not verified. The same applies to "file reference" and "POSIX path".

As a quick test, try to compile the samples above in your favorite script editor. Unless your disk's name is "path" and you have a file called "file" within a folder called "to" at root level, you won't be able to compile the alias, while the rest of file specifications will compile with no problem.

Also, alias is the most common file specification for most of applications.

Offline

 
  • Index
  •  » OS X Finder
  •  » What does "alias" mean in reference to a file, folder or application?

Board footer

Powered by FluxBB

[ Generated in 0.076 seconds, 8 queries executed ]

RSS (new topics) RSS (active topics)