Class File

Object
   |
   +--File

class File

Defined in file.js


Field Summary
 string ext
          
 int lastModified
          
 string leaf
          
 string name
          
 nsIFile nsIFile
          
 string path
          
 int permissions
          
 
Constructor Summary
File( aPath )
           
 
Method Summary
 boolean append( <string> arg )
           Constructs a descendent of the current file.
 boolean canRead( )
           Tests whether this file can be read with the current permissions.
 boolean canWrite( )
           Tests whether this file can be written to with the current permissions.
 void close( )
           Closes the current file object to further reading or writing.
 void create( type )
           Creates the file in the filesystem.
 boolean exists( )
           Whether the file exists in the filesystem or not
 string getExtension( )
           Returns everything after the name.
 int getLastModified( )
           Returns the the last time this file object was modified Requires file to exist.
 string getLeaf( )
           Returns everything after the path
 string getName( )
           Returns everything after the path and before the extension.
 nsIFIle getNSIFile( )
          
 File getParent( )
           Returns a File instance of this object's parent
 Object getPath( <string> type )
          
 int getPermissions( )
           Returns the permissions of the current file object.
 boolean isDir( )
           Tests whether this object represents a directory.
 boolean isFile( )
           Tests whether this object represents a file.
 boolean move( <Object> arg )
           Requires the file to exist.
 boolean open( <string> arg )
           Prepares the current file object for reading or writing.
 string read( <int> size )
           Performs a read on the underlying file object.
 array readAllLines( )
           Reads all lines of the file into an Array object If another type of read operation has or will be performed, a close() and open() must be done first.
 string readBase64( )
           Read the entire file with Base64 encoding.
 array readByteArray( )
           Read the file as an array of bytes.
 string readLine( )
           Reads a single line of string text terminated by a CR, LF, CRLF, LFCR, or eof.
 boolean remove( )
           Removes the current file from the filesystem.
 boolean rename( <string> arg )
           Renames the file.
 void setPermissions( <int> arg )
           Sets permissions of the current file object.
 boolean write( arg )
           Performs a write on the underlying nsIFile object.

Field Detail

ext

string ext

lastModified

int lastModified

leaf

string leaf

name

string name

nsIFile

nsIFile nsIFile

path

string path

permissions

int permissions

Constructor Detail

File

File( aPath )

Method Detail

append

boolean append( <string> arg )

canRead

boolean canRead( )

canWrite

boolean canWrite( )

close

void close( )

create

void create( type )

exists

boolean exists( )

getExtension

string getExtension( )

getLastModified

int getLastModified( )

getLeaf

string getLeaf( )

getName

string getName( )

getNSIFile

nsIFIle getNSIFile( )

getParent

File getParent( )

getPath

Object getPath( <string> type )

getPermissions

int getPermissions( )

isDir

boolean isDir( )

isFile

boolean isFile( )

move

boolean move( <Object> arg )

open

boolean open( <string> arg )

read

string read( <int> size )

readAllLines

array readAllLines( )

readBase64

string readBase64( )

readByteArray

array readByteArray( )

readLine

string readLine( )

remove

boolean remove( )

rename

boolean rename( <string> arg )

setPermissions

void setPermissions( <int> arg )

write

boolean write( arg )


Documentation generated by JSDoc on Tue Jan 23 13:16:38 2007