public class ManagedFolder extends JSBaseScriptableObject implements IFolderObject
Constructor and Description |
---|
ManagedFolder() |
Modifier and Type | Method and Description |
---|---|
void |
jsConstructor(java.lang.String theRelativePath)
Creates a managed folder instance.
|
java.lang.String |
(JavaScript Function) getAbsolutePath()
Get the folder's absolute path.
|
FileAndFolderIterator |
(JavaScript Function) getContents(int theDepth)
Gets all files and folders in the folder.
|
boolean |
(JavaScript Function) isBundle()
Check if the folder is a bundle
|
void |
(JavaScript Function) lock()
Creates a MediaBeacon-managed lock on this ManagedFolder.
|
void |
(JavaScript Function) unlock()
Unlocks this managed folder.
|
Bundle |
(JavaScript Getter) bundle()
Get the bundle control file for a folder
|
int |
(JavaScript Getter) directoryId() |
boolean |
(JavaScript Getter) exists()
Checks if this folder exists on the server's file system.
|
java.lang.String |
(JavaScript Getter) name()
Returns the name of the directory.
|
IFolderObject |
(JavaScript Getter) parent()
Returns the parent directory.
|
java.lang.String |
(JavaScript Getter) path()
Get the folder's path relative to the MediaBeacon asset root folder.
|
associateValue, avoidObjectDetection, callMethod, callMethod, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, get, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassName, getClassPrototype, getDefaultValue, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasInstance, hasProperty, hasProperty, isConst, isEmpty, isExtensible, isSealed, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, size
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public void jsConstructor(java.lang.String theRelativePath) throws InvalidManagedFolderPathException
theRelativePath
- the path, relative to the MediaBeacon asset root, to a folder currently managed by MediaBeacon.
This path should contain unix-style file separators regardless of what file system hosts the assets.InvalidManagedFolderPathException
- if the folder is not found or isn't managed by MediaBeacon.public java.lang.String (JavaScript Getter) path()
(JavaScript Getter) path
in interface IFolderObject
public java.lang.String (JavaScript Function) getAbsolutePath()
public void (JavaScript Function) lock() throws ConcurentActionsException, java.lang.InterruptedException
ConcurentActionsException
- if unable to obtain a lock within the system property-configurable amount of time.
Also thrown if this ManagedFolder object is stale and the folder it references has been deleted, renamed or moved since
this ManagedFolder object was constructed.java.lang.InterruptedException
- if the thread was interrupted while waiting to obtain the lock.public void (JavaScript Function) unlock()
public boolean (JavaScript Getter) exists()
(JavaScript Getter) exists
in interface IFolderObject
true
if the file or directory exists.public java.lang.String (JavaScript Getter) name()
(JavaScript Getter) name
in interface IFolderObject
public IFolderObject (JavaScript Getter) parent()
(JavaScript Getter) parent
in interface IFolderObject
IFileObject
represents parent file or directory.public boolean (JavaScript Function) isBundle()
true
if the folder is a bundle, false
otherwisepublic Bundle (JavaScript Getter) bundle()
public FileAndFolderIterator (JavaScript Function) getContents(int theDepth)
theDepth
- the depth of the recursion, if it is not specified or null then the method returns all files and folders at any depth.public int (JavaScript Getter) directoryId()
Copyright © 2017 MediaBeacon, Inc. All Rights Reserved.