Child pages
  • JSFile

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Rev: 1384958006482
Div
styledisplay:none

DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY (EXCEPT INSIDE THE DIV BELOW WITH ID=DESCRIPTION), UNLESS YOU KNOW WHAT YOU'RE DOING.
THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO AUTO UPDATE THE CONTENT THROUGH THE DOC GENERATOR. Enter additional information related to this 'class' inside the {div} macro with 'id=description'

Div
iddescription



HTML Table
id
classservoy sSummary
Colgroup Tag
Col
width80px
Col
Table Head (thead)
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Method Summary
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
canRead()
Returns true if the file exists and is readable (has access to it) - works on remote files too.
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
canWrite()
Returns true if the file exists and can be modified - works on remote files too.
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
createNewFile()
Creates the file on disk if needed.
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
deleteFile()
Deletes the file from the disk if possible.
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
exists()
Returns true if the file/directory exists on the filesystem - works on remote files too.
Table Row (tr)
Table Cell (td)
JSFile
Table Cell (td)
getAbsoluteFile()
Returns a JSFile instance that corresponds to the absolute form of this pathname - works on remote files too.
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
getAbsolutePath()
Returns a String representation of the absolute form of this pathname - works on remote files too.
Table Row (tr)
Table Cell (td)
byte[]
Table Cell (td)
getBytes()
Gets the contents (bytes) for the file data.
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
getContentType()
Returns the contenttype of this file, like for example 'application/pdf' - works on remote files too.
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
getName()
Returns the name of the file.
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
getParent()
Returns the String representation of the path of the parent of this file - works on remote files too.
Table Row (tr)
Table Cell (td)
JSFile
Table Cell (td)
getParentFile()
Returns a JSFile instance that corresponds to the parent of this file - works on remote files too.
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
getPath()
Returns a String holding the path to the file - works on remote files too.
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
isAbsolute()
Returns true if the path is absolute.
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
isDirectory()
Returns true if the file is a directory - works on remote files too.
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
isFile()
Returns true if the file is a file and not a regular file - works on remote files too.
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
isHidden()
Returns true if the file is hidden (a file system attribute) - works on remote files too.
Table Row (tr)
Table Cell (td)
Date
Table Cell (td)
lastModified()
Returns the time/date of the last modification on the file - works on remote files too.
Table Row (tr)
Table Cell (td)
String[]
Table Cell (td)
list()
Returns an array of strings naming the files and directories located inside the file, if the file is a directory - works on remote files too.
Table Row (tr)
Table Cell (td)
JSFile[]
Table Cell (td)
listFiles()
Returns an array of JSFiles naming the files and directories located inside the file, if the file is a directory - works on remote files too.
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
mkdir()
Creates a directory on disk if possible.
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
mkdirs()
Creates a directory on disk, together with all its parent directories, if possible.
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
renameTo(destination)
Renames the file to a different name.
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
setBytes(bytes)
Set the content of the file (local or remote) to the bytes provided<br/>
Will not create a new file if one doesn't exist
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
setBytes(bytes, createFile)
Set the content of the file (local or remote) to the bytes provided
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
setLastModified(date)
Sets the date/time of the last modification on the file.
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
setReadOnly()
Sets the readonly attribute of the file/directory.
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
size()
Returns the size in bytes of the file.

...