File in Photoshop DOM

Represents a file on disk.

Self Methods

name returns description
decode(str) String Decode the input string according to RFC 2396.
encode(str) String Encode the input string according to RFC 2396.

Instance Properties

name type description
absoluteURI String (read only) The full path name for the file in URI notation.
alias Boolean (read only) Is the file a file system alias?
created Date (read only) Creation date for the file.
creator String (read only) The Macintosh file creator as a four-character string.
encoding String The encoding of the file for read/write operations.
eof Boolean (read only) Is the file pointer at the end of the File?
error String The last file system error.
exists Boolean (read only) Returns true if the path of this File refers to an existing file on disk.
fsName String (read only) The file-system-specific name of this File as a full path name.
hidden Boolean Is the File invisible?
length Number The size of the File in bytes.
lineFeed String The line feed character(s) used.
name String (read only) The name of the File without the path specification.
parent Folder (read only) The Folder containing this File.
path String (read only) The path portion of the absoluteURI.
readonly Boolean May the file be altered?
relativeURI String (read only) The path name for the File in URI notation, relative to the current folder.
type String (read only) The Macintosh file type as a four-character string.

Instance Methods

name returns description
close() Boolean Close the open File.
copy(target) Boolean Copy the file to the given location.
execute() Boolean Run or open the file.
getRelativeURI([basePath]) String Calculate the path relative to another.
open(mode,[type],[creator]) Boolean Open the file for read/write operations.
read([chars]) String Read the contents of the file.
readch() String Read a single character.
readln() String Read one line of text.
remove() Boolean Delete the file.
rename(newName) Boolean Rename the file.
resolve() File Find the original that the alias points to.
seek(pos,mode) Boolean Seek to a location in the file.
tell() Number Find position in file.
write(str1,[str2],[...]) Boolean Write string data to the file.
writeln(str1,[str2],[...]) Boolean Write string data to the file.

Properties that are a File

name object description
additionalPluginFolder Preferences
fullName Document (read only) full path name of document
path Application (read only) The full path of the location of the Photoshop application
path Document (read only) the path of the document

Methods that return a File

name of object description
getPath(key) ActionDescriptor get the value of a key of type Alias
getPath(index) ActionList get the value of an item of type Alias
resolve() File Find the original that the alias points to.

Arguments that are a File

name in method of object description
displacementMapFile applyDisplace(horizontalScale,verticalScale,displacementType,…) ArtLayer
doc open(doc,[as]) Application
exportIn exportDocument(exportIn,[exportAs],[options]) Document
file importAnnotations(file) Document
saveIn saveAs(saveIn,[options],[asCopy],…) Document
target copy(target) File The target location. May also<
textureFile applyTextureFill(textureFile) ArtLayer
textureFile applyGlassEffect(distortion,smoothness,scaling,…) ArtLayer
value putPath(value) ActionList
value putPath(key,value) ActionDescriptor