Class FileObject

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

public class FileObject extends org.mozilla.javascript.ScriptableObject
An EcmaScript FileIO 'File' object
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.mozilla.javascript.ScriptableObject

    org.mozilla.javascript.ScriptableObject.KeyComparator
  • 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

    Constructors
    Modifier
    Constructor
    Description
    protected
     
    protected
    FileObject(String fileName)
     
    protected
    FileObject(String pathName, String fileName)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    boolean
     
    void
     
    boolean
     
    boolean
    eof()
     
     
    boolean
     
    static FileObject
    fileObjCtor(org.mozilla.javascript.Context cx, Object[] args, org.mozilla.javascript.Function ctorObj, boolean inNewExpr)
     
    boolean
     
     
     
    protected File
     
    double
     
     
     
     
    static void
    init(org.mozilla.javascript.Scriptable scope)
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    double
     
     
    boolean
     
    boolean
     
     
     
    boolean
     
    boolean
     
    protected void
     
     
     
    boolean
    write(Object what)
     
    boolean
     

    Methods inherited from class org.mozilla.javascript.ScriptableObject

    applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChangeForSlot, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureScriptableObjectButNotSymbol, ensureSymbolScriptable, equivalentValues, get, get, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getSuperProperty, getSuperProperty, getSuperProperty, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, has, hasInstance, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, put, putConst, putConstProperty, putOwnProperty, putOwnProperty, putOwnProperty, putProperty, putProperty, putProperty, putSuperProperty, putSuperProperty, putSuperProperty, querySlot, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, size

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • FileObject

      protected FileObject()
    • FileObject

      protected FileObject(String fileName)
    • FileObject

      protected FileObject(String pathName, String fileName)
  • Method Details

    • fileObjCtor

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

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

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

      public String toString()
      Overrides:
      toString in class Object
    • toDetailString

      public String toDetailString()
    • setError

      protected void setError(Throwable e)
    • exists

      public boolean exists()
    • open

      public boolean open()
    • isOpened

      public boolean isOpened()
    • close

      public boolean close()
    • write

      public boolean write(Object what)
    • writeln

      public boolean writeln(Object what)
    • readln

      public 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 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 String getParent()
    • getName

      public String getName()
    • getPath

      public String getPath()
    • getAbsolutePath

      public String getAbsolutePath()
    • isAbsolute

      public boolean isAbsolute()
    • mkdir

      public boolean mkdir()
    • list

      public Object list()
    • readAll

      public String readAll()
    • getFile

      protected File getFile()