helma.scripting.rhino.extensions
Class FileObject

java.lang.Object
  extended by org.mozilla.javascript.ScriptableObject
      extended by helma.scripting.rhino.extensions.FileObject
All Implemented Interfaces:
java.io.Serializable, org.mozilla.javascript.ConstProperties, org.mozilla.javascript.debug.DebuggableObject, org.mozilla.javascript.Scriptable

public class FileObject
extends org.mozilla.javascript.ScriptableObject

An EcmaScript FileIO 'File' object

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.mozilla.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
 
Fields inherited from interface org.mozilla.javascript.Scriptable
NOT_FOUND
 
Constructor Summary
protected FileObject()
           
protected FileObject(java.lang.String fileName)
           
protected FileObject(java.lang.String pathName, java.lang.String fileName)
           
 
Method Summary
 boolean canRead()
           
 boolean canWrite()
           
 void clearError()
           
 boolean close()
           
 boolean eof()
           
 java.lang.String error()
           
 boolean exists()
           
static FileObject fileObjCtor(org.mozilla.javascript.Context cx, java.lang.Object[] args, org.mozilla.javascript.Function ctorObj, boolean inNewExpr)
           
 boolean flush()
           
 java.lang.String getAbsolutePath()
           
 java.lang.String getClassName()
           
protected  java.io.File getFile()
           
 double getLength()
           
 java.lang.String getName()
           
 java.lang.String getParent()
           
 java.lang.String getPath()
           
static void init(org.mozilla.javascript.Scriptable scope)
           
 boolean isAbsolute()
           
 boolean isDirectory()
           
 boolean isFile()
           
 boolean isOpened()
           
 double lastModified()
           
 java.lang.Object list()
           
 boolean mkdir()
           
 boolean open()
           
 java.lang.String readAll()
           
 java.lang.String readln()
           
 boolean remove()
           
 boolean renameTo(FileObject toFile)
           
protected  void setError(java.lang.Throwable e)
           
 java.lang.String toDetailString()
           
 java.lang.String toString()
           
 boolean write(java.lang.Object what)
           
 boolean writeln(java.lang.Object what)
           
 
Methods inherited from class org.mozilla.javascript.ScriptableObject
associateValue, avoidObjectDetection, callMethod, callMethod, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, equivalentValues, get, get, getAllIds, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, has, has, hasInstance, hasProperty, hasProperty, isConst, isSealed, put, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setParentScope, setPrototype
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FileObject

protected FileObject()

FileObject

protected FileObject(java.lang.String fileName)

FileObject

protected FileObject(java.lang.String pathName,
                     java.lang.String fileName)
Method Detail

fileObjCtor

public static FileObject fileObjCtor(org.mozilla.javascript.Context cx,
                                     java.lang.Object[] args,
                                     org.mozilla.javascript.Function ctorObj,
                                     boolean inNewExpr)

init

public static void init(org.mozilla.javascript.Scriptable scope)

getClassName

public java.lang.String getClassName()
Specified by:
getClassName in interface org.mozilla.javascript.Scriptable
Specified by:
getClassName in class org.mozilla.javascript.ScriptableObject

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toDetailString

public java.lang.String toDetailString()

setError

protected void setError(java.lang.Throwable e)

exists

public boolean exists()

open

public boolean open()

isOpened

public boolean isOpened()

close

public boolean close()

write

public boolean write(java.lang.Object what)

writeln

public boolean writeln(java.lang.Object what)

readln

public java.lang.String readln()

eof

public boolean eof()

isFile

public boolean isFile()

isDirectory

public boolean isDirectory()

flush

public boolean flush()

getLength

public double getLength()

lastModified

public double lastModified()

error

public java.lang.String error()

clearError

public void clearError()

remove

public boolean remove()

renameTo

public boolean renameTo(FileObject toFile)

canRead

public boolean canRead()

canWrite

public boolean canWrite()

getParent

public java.lang.String getParent()

getName

public java.lang.String getName()

getPath

public java.lang.String getPath()

getAbsolutePath

public java.lang.String getAbsolutePath()

isAbsolute

public boolean isAbsolute()

mkdir

public boolean mkdir()

list

public java.lang.Object list()

readAll

public java.lang.String readAll()

getFile

protected java.io.File getFile()


Copyright © 1998-1998-${year} Helma.org. All Rights Reserved.