EDOBE XDOM TAKE 6 IR - PRODUCTSHEET Spezifikationen Seite 42

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 304
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 41
CHAPTER 3: File System Access Using File and Folder objects 42
a folder C:\C on Windows. A path starting with /c always addresses the drive C:, so in this case, to access
the folder by name, you must use both the drive name and the folder name, for example
/c/c for C:\C.
If the current drive contains a root folder with the same name as another drive letter, that name is
considered to be a folder. That is, if there is a folder
D:\C, and if the current drive is D:, the URI path
/c/temp/file translates to the Windows path D:\c\temp\file. In this case, to access drive C, you would
have to use the Windows path name conventions.
To access a remote volume, use a uniform naming convention (UNC) path name of the form
//servername/sharename. These path names are portable, because both Max OS X and UNIX ignore
multiple slash characters. Note that on Windows, UNC names do not work for local volumes.
These examples assume that the current drive is
D:
Aliases
When you access an alias, the operation is transparently forwarded to the real file. The only operations that
affect the alias are calls to
rename and remove, and setting properties readonly and hidden. When a File
object represents an alias, the
alias property of the object returns true, and the resolve method returns
the
File or Folder object for the target of the alias.
On Windows, all file system aliases (called shortcuts) are actual files whose names end with the extension
.lnk. Never use this extension directly; the File and Folder objects work without it.
For example, suppose there is a shortcut to the file
/folder1/some.txt in the folder /folder2. The full
Windows file name of the shortcut file is
\folder2\some.txt.lnk.
To access the shortcut from a
File object, specify the path /folder2/some.txt. Calling that File objects
open method opens the linked file (in /folder1). Calling the File objects rename method renames the
shortcut file itself (leaving the
.lnk extension intact).
However, Windows permits a file and its shortcut to reside in the same folder. In this case, the
File object
always accesses the original file. You cannot create a
File object to access the shortcut when it is in the
same folder as its linked file.
A script can create a file alias by creating a
File object for a file that does not yet exist on disk, and using its
createAlias method to specify the target of the alias.
Portability issues
If your application will run on multiple platforms, use relative path names, or try to originate path names
from the home directory. If that is not possible, work with Mac OS X and UNIX aliases, and store your files
on a machine that is remote to your Windows machine so that you can use UNC names.
URI path name Windows path name
/c/dir/file c:\dir\file
/remote/dir/file D:\remote\dir\file
/root/dir/file D:\root\dir\file
~/dir/file C:\Documents and Settings\jdoe\dir\file
Seitenansicht 41
1 2 ... 37 38 39 40 41 42 43 44 45 46 47 ... 303 304

Kommentare zu diesen Handbüchern

Keine Kommentare