Path name syntax is very different in Windows®, Mac OS®, and UNIX®, so Adobe ExendScript defines the
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.
Folder object supports file system functionality such as traversing the hierarchy; creating, renaming, or removing files; or resolving file aliases.
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