• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Overview

Path name syntax is very different in Windows®, Mac OS®, and UNIX®, so Adobe ExendScript defines the File and Folder objects to provide platform-independent access to the underlying file system. A File Object (page 139) represents a disk file; a Folder Object (page 148) represents a directory or folder.

  • The Folder object supports file system functionality such as traversing the hierarchy; creating, renaming, or removing files; or resolving file aliases.

  • The File object supports input/output functions to read or write files.

There are several ways to distinguish between a File and a Folder object. For example:

if (f instanceof File) ...
if (typeof f.open == "undefined") ...// Folders do not
open

File and Folder objects can be used anywhere that a path name is required, such as in properties and arguments for files and folders. For details about the objects and their properties and methods, see Chapter 7, “File and Folder Object Reference,” on page 139.

Note

When you create two File objects that refer to the same disk file, they are treated as distinct objects. If you open one of them for I/O, the operating system might inhibit access from the other object, because the disk file already is open.


  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint