File is a built-in prototype that extends AxiomObject. It is instantiated by passing either a MimePart Object (as submitted via a multipart/formdata form post) or File System path into the constructor.
Since they extend AxiomObject, File Objects have all the properties and methods that Axiom Objects have. Below are the methods specific to File Objects.
Contents |
File.getContent()
Description
File.getContent()
Returns the contents of the file.
Returns
(String) - The contents of the file.
File.getContentType()
Description
File.getContentType()
Returns the ContentType of the file.
Returns
(String) - The ContentType of the file.
File.getFileName()
Description
File.getFileName()
Returns the name of the file.
Returns
(String) - The name of the file.
File.getFileSize()
Description
File.getFileSize()
Returns the size of the file.
Returns
(Number) - The size of the file.
File.path()
Description
File.path()
Returns the absolute file system path to where this File Object's binary large object was stored.
Returns
(String) - The absolute file system path to where this File Object's binary large object was stored.
File.replaceFile()
Description
File.replaceFile(file)
Replaces the file stored in this File Object.
Parameters
- file (MimePart or String) - The new file.
