File in Photoshop DOM
Represents a file on disk.
Class Methods
| name | returns | description |
|---|---|---|
| decode() | String | Decode the input string according to RFC 2396. |
| encode() | 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. |
| 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. |
| 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.
|
| relativeURI | String | (read only) The path name for the File in URI notation, relative to the current folder. |
| 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? |
| hidden | Boolean | Is the File invisible? |
| length | Number | The size of the File in bytes. |
| lineFeed | String | The line feed character(s) used. |
| readonly | Boolean | May the file be altered? |
| type | String | (read only) The Macintosh file type as a four-character string. |
Instance Methods
| name | returns | description |
|---|---|---|
| read() | String | Read the contents of the file. |
| getRelativeURI() | String | Calculate the path relative to another. |
| remove() | Boolean | Delete the file. |
| rename() | Boolean | Rename the file. |
| resolve() | File | Find the original that the alias points to. |
| execute() | Boolean | Run or open the file. |
| readch() | String | Read a single character. |
| readln() | String | Read one line of text. |
| seek() | Boolean | Seek to a location in the file. |
| tell() | Number | Find position in file. |
| write() | Boolean | Write string data to the file. |
| writeln() | Boolean | Write string data to the file. |
| open() | Boolean | Open the file for read/write operations. |
| close() | Boolean | Close the open File. |
| copy() | Boolean | Copy the file to the given location. |
Properties that are a File
| name | object | description |
|---|---|---|
| path | Application | (read only) The full path of the location of the Photoshop application |
| fullName | Document | (read only) full path name of document |
| path | Document | (read only) the path of the document |
| additionalPluginFolder | Preferences |
Methods that return a File
| name | of object | description |
|---|---|---|
| resolve() | File | Find the original that the alias points to. |
| getPath() | ActionDescriptor | get the value of a key of type Alias |
| getPath() | ActionList | get the value of an item of type Alias |
Arguments that are a File
| name | in method | of object | description |
|---|---|---|---|
| doc | open() | Application | |
| value | putPath() | ActionDescriptor | |
| value | putPath() | ActionList | |
| displacementMapFile | applyDisplace() | ArtLayer | |
| textureFile | applyGlassEffect() | ArtLayer | |
| textureFile | applyTextureFill() | ArtLayer | |
| exportIn | exportDocument() | Document | |
| file | importAnnotations() | Document | |
| saveIn | saveAs() | Document | |
| target | copy() | File | The target location. May also< |