File

Object
   |
   +--File

Deprecated use {link helma.File} instead

Defined in File.js



Constructor Summary
File(<String> filepath)
            Constructor for File objects, providing read and write access to the file system.
 
Methods Summary
 Boolean canRead()
           Tests whether the application can read the file represented by this File object.
 Boolean canWrite()
           Tests whether the file represented by this File object is writable.
 void clearError()
           Clears any error message that may otherwise be returned by the error method.
 Boolean close()
           Closes the file represented by this File object.
 Boolean eof()
           Returns true if the file represented by this File object has been read entirely and the end of file has been reached.
 String error(Object)
           Contains the last error that occured, if any.
 Boolean exists()
           Tests whether the file or directory represented by this File object exists.
 Boolean flush()
           Purges the content of the file represented by this File object.
 String getAbsolutePath()
           Returns the absolute pathname string of this file.
 Number getLength()
           Returns the length of the file represented by this File object.
 String getName()
           Returns the name of the file or directory represented by this File object.
 String getParent()
           Returns the pathname string of this File object's parent directory.
 String getPath()
           Returns the pathname string of this File object.
 Boolean isAbsolute()
           Tests whether this File object's pathname is absolute.
 Boolean isDirectory()
           Tests whether the file represented by this File object is a directory.
 Boolean isFile()
           Tests whether the file represented by this File object is a normal file.
 Boolean isOpened()
           Returns true if the file represented by this File object is currently open.
 Number lastModified()
           Returns the time when the file represented by this File object was last modified.
 Object list(<RegExp> pattern)
           List of all files within the directory represented by this File object.
 Boolean mkdir()
           Creates the directory represented by this File object.
 Boolean open()
           Opens the file represented by this File object.
 String readAll()
           This methods reads all the lines contained in the file and returns them.
 String readln()
           This methods reads characters until an end of line/file is encountered then returns the string for these characters (without any end of line character).
 Boolean remove()
           Deletes the file or directory represented by this File object.
 Boolean renameTo(<String> dest)
           Renames the file represented by this File object.
 Boolean write(<String> data)
           Appends a string to the file represented by this File object.
 Boolean writeln(<String> data)
           Appends a string with a platform specific end of line to the file represented by this File object.

Constructor Detail

File

File(<String> filepath)

Method Detail

canRead

Boolean canRead()

canWrite

Boolean canWrite()

clearError

void clearError()

close

Boolean close()

eof

Boolean eof()

error

String error(Object)

exists

Boolean exists()

flush

Boolean flush()

getAbsolutePath

String getAbsolutePath()

getLength

Number getLength()

getName

String getName()

getParent

String getParent()

getPath

String getPath()

isAbsolute

Boolean isAbsolute()

isDirectory

Boolean isDirectory()

isFile

Boolean isFile()

isOpened

Boolean isOpened()

lastModified

Number lastModified()

list

Object list(<RegExp> pattern)

mkdir

Boolean mkdir()

open

Boolean open()

readAll

String readAll()

readln

String readln()

remove

Boolean remove()

renameTo

Boolean renameTo(<String> dest)

write

Boolean write(<String> data)

writeln

Boolean writeln(<String> data)


Documentation generated by JSDoc on Thu Apr 5 01:59:00 2007