Methods
| Method | Returns | Description |
|---|---|---|
| add() | Config1_Folder | Adds a folder of the given type. |
| get() | Config1_Folder | Returns a Config1_Folder object for the given path. |
| list() | Array.<Config1_Folder> | Returns an array of Config1_Folder objects representing all root folders in the virtual file-system including inbuilt ones. |
| listAll() | Array.<Config1_Folder> | Returns an array of Config1_Folder objects representing all folders in the virtual file-system regardless of their location in the folder-tree including inbuilt ones. |
| listWindowsDirectory() | Array.<Config1_WindowsFile> | Returns a listing of the given Windows folder (in the Windows file-system) in the form of an array of Config1_WindowsFile objects. |
| move() | void | Moves the given folder to another path. |
| remove() | void | Deletes the given folder. |
Method Details
add(path, type, mappingPath) → {Config1_Folder}
- Description:
Adds a folder of the given type.
Parameters:
| Name | Type | Description |
|---|---|---|
path |
String | Absolute path of the folder in the virtual file-system. |
type |
String | Type of the folder. Currently, the following types are supported:
|
mappingPath |
String | Controls how the folder is mapped to the underlying file-system.
|
Returns:
A Config1_Folder object for the added folder.
- Type
- Config1_Folder
get(path) → {Config1_Folder}
- Description:
Returns a Config1_Folder object for the given path.
Parameters:
| Name | Type | Description |
|---|---|---|
path |
String | Absolute path of the folder in virtual file-system. |
Returns:
- Type
- Config1_Folder
list() → {Array.<Config1_Folder>}
- Description:
Returns an array of Config1_Folder objects representing all root folders in the virtual file-system including inbuilt ones.
Returns:
- Type
- Array.<Config1_Folder>
listAll() → {Array.<Config1_Folder>}
- Description:
Returns an array of Config1_Folder objects representing all folders in the virtual file-system regardless of their location in the folder-tree including inbuilt ones.
Returns:
- Type
- Array.<Config1_Folder>
listWindowsDirectory(path, includeFilesopt) → {Array.<Config1_WindowsFile>}
- Description:
Returns a listing of the given Windows folder (in the Windows file-system) in the form of an array of Config1_WindowsFile objects.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
path |
String | Absolute path of the folder in the Windows file-system. |
||
includeFiles |
Boolean |
<optional> |
false
|
If true, files within the folder are also included. |
Returns:
- Type
- Array.<Config1_WindowsFile>
move(folder, parentFolder)
- Description:
Moves the given folder to another path.
Parameters:
| Name | Type | Description |
|---|---|---|
folder |
String | Config1_Folder | Virtual file-system path or Config1_Folder object of the folder to be moved. |
parentFolder |
String | Config1_Folder | Virtual file-system path or Config1_Folder object of the folder to move it to. Note that to move the folder to root level, this parameter needs to be set to '/'. |
remove(folder, recursiveopt)
- Description:
Deletes the given folder.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
folder |
String | Config1_Folder | Virtual file-system path or Config1_Folder object of the folder to be deleted. |
||
recursive |
Boolean |
<optional> |
false
|
If true, the folder will be deleted recursively. |