public class UnmanagedFile extends FileBase
myBufferedReader, myBufferedWriter, myErrorMessage, myFile, myFileOutputStream, myXmp
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
kServerTypeAttribute
Constructor and Description |
---|
UnmanagedFile() |
Modifier and Type | Method and Description |
---|---|
void |
jsConstructor(java.lang.String thePathName)
Construct a unmanaged file reference to a file that may or may not exist.
|
boolean |
jsFunction_create()
Creates this file and all parent folders.
|
BufferedReader |
jsFunction_getBufferedReader(java.lang.String theEncoding)
Returns a BufferedReader for reading the file contents.
|
BufferedWriter |
jsFunction_getBufferedWriter(boolean theAppend,
java.lang.String theEncoding)
Returns a BufferedWriter for writing the file contents.
|
FileOutputStream |
jsFunction_getFileOutputStream()
Gets a FileOutputStream for writing the file contents.
|
java.lang.String |
jsFunction_getRelativePath()
Get the file's path relative to the MediaBeacon asset root.
|
void |
jsFunction_releaseXmp()
Releases the fetched XMP object (if it's been fetched) so its memory can be reclaimed.
|
java.lang.String |
jsFunction_toString()
Returns the filepath of this UnmanagedFile.
|
boolean |
jsFunction_writeXmp()
Saves xmp changes to physical file.
|
java.lang.String |
jsGet_base64()
Gets the bytes for this file and encodes it as a base64 string
|
java.lang.String |
jsGet_colorprofile()
Returns the colorprofile format.
|
java.lang.String |
jsGet_colorspace()
Returns the colorspace format.
|
org.mozilla.javascript.IdScriptableObject |
jsGet_errorMessage()
Gets error message that occurred during xmp writing.
|
boolean |
jsGet_exists()
Tests whether the file denoted by this abstract pathname exists.
|
java.lang.String |
jsGet_fileNameExtension()
Returns the file name extension by parsing the file's name.
|
java.lang.String |
jsGet_format()
Returns the image format.
|
java.lang.String |
jsGet_getFileContents()
Deprecated.
use
UnmanagedFile.jsFunction_getBufferedReader(String) instead. |
int |
jsGet_height()
Returns the image height.
|
long |
jsGet_lastModified()
Return file modified timestamp in milliseconds
|
long |
jsGet_length()
Returns the length of the file.
|
java.lang.String |
jsGet_name()
Returns the name of the file or directory.
|
IFolderObject |
jsGet_parent()
Returns the parent file o directory.
|
java.lang.String |
jsGet_path()
Returns the file's absolute path.
|
long |
jsGet_rawLength()
Get the raw file size, without metadata.
|
java.lang.Double |
jsGet_resolution()
Returns the image resolution.
|
int |
jsGet_width()
Returns the image width.
|
Xmp |
jsGet_xmp()
Returns the Xmp (metadata) object for the file.
|
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, getClassName, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public void jsConstructor(java.lang.String thePathName) throws java.io.IOException
thePathName
- the absolute or relative path to the file.java.io.IOException
public boolean jsGet_exists()
true
if the file or directory exists.public long jsGet_lastModified()
public java.lang.String jsGet_name()
public java.lang.String jsGet_fileNameExtension()
public java.lang.String jsGet_path()
public java.lang.String jsFunction_getRelativePath()
public IFolderObject jsGet_parent()
IFileObject
represents parent file or directory.public long jsGet_length()
0L
if the file does not exist.public Xmp jsGet_xmp()
Xmp
public void jsFunction_releaseXmp()
public long jsGet_rawLength()
public int jsGet_width()
public int jsGet_height()
public java.lang.String jsGet_format()
public java.lang.String jsGet_colorspace()
public java.lang.String jsGet_colorprofile()
public java.lang.Double jsGet_resolution()
IFileObject
@Deprecated public java.lang.String jsGet_getFileContents()
UnmanagedFile.jsFunction_getBufferedReader(String)
instead.public java.lang.String jsGet_base64()
public boolean jsFunction_create() throws java.io.IOException
true
if and only if the directory was created, along with all necessary parent directories; false
otherwisejava.io.IOException
- If an I/O error occurredpublic org.mozilla.javascript.IdScriptableObject jsGet_errorMessage()
public boolean jsFunction_writeXmp()
public BufferedReader jsFunction_getBufferedReader(java.lang.String theEncoding) throws java.io.IOException
java.io.IOException
- if there was an error getting or creating the BufferedReaderBufferedReader
public BufferedWriter jsFunction_getBufferedWriter(boolean theAppend, java.lang.String theEncoding) throws java.io.IOException
theAppend
- true if file should be opened for appendtheEncoding
- default is UTF-8, can pass others (like UTF-16)java.io.IOException
- if there was an error getting or creating the BufferedWriterBufferedWriter
public FileOutputStream jsFunction_getFileOutputStream() throws java.io.IOException
java.io.IOException
public java.lang.String jsFunction_toString()
Copyright © 2023 MediaBeacon, Inc. All Rights Reserved.