Package helma.scripting.rhino.extensions
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
ConstructorsModifierConstructorDescriptionprotected
protected
FileObject
(String fileName) protected
FileObject
(String pathName, String fileName) -
Method Summary
Modifier and TypeMethodDescriptionboolean
canRead()
boolean
canWrite()
void
boolean
close()
boolean
eof()
error()
boolean
exists()
static FileObject
fileObjCtor
(org.mozilla.javascript.Context cx, Object[] args, org.mozilla.javascript.Function ctorObj, boolean inNewExpr) boolean
flush()
protected File
getFile()
double
getName()
getPath()
static void
init
(org.mozilla.javascript.Scriptable scope) boolean
boolean
boolean
isFile()
boolean
isOpened()
double
list()
boolean
mkdir()
boolean
open()
readAll()
readln()
boolean
remove()
boolean
renameTo
(FileObject toFile) protected void
toString()
boolean
boolean
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, getGeneratorFunctionPrototype, 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
-
Constructor Details
-
FileObject
protected FileObject() -
FileObject
-
FileObject
-
-
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
- Specified by:
getClassName
in interfaceorg.mozilla.javascript.Scriptable
- Specified by:
getClassName
in classorg.mozilla.javascript.ScriptableObject
-
toString
-
toDetailString
-
setError
-
exists
public boolean exists() -
open
public boolean open() -
isOpened
public boolean isOpened() -
close
public boolean close() -
write
-
writeln
-
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
-
clearError
public void clearError() -
remove
public boolean remove() -
renameTo
-
canRead
public boolean canRead() -
canWrite
public boolean canWrite() -
getParent
-
getName
-
getPath
-
getAbsolutePath
-
isAbsolute
public boolean isAbsolute() -
mkdir
public boolean mkdir() -
list
-
readAll
-
getFile
-