Class FileObject

  • All Implemented Interfaces:
    java.io.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:
    Serialized Form
    • 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 FileObject()  
      protected FileObject​(java.lang.String fileName)  
      protected FileObject​(java.lang.String pathName, java.lang.String fileName)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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

        applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, equivalentValues, get, get, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, 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, putProperty, putProperty, putProperty, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, size
      • 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()