Methods
add(path, type, mappingPath) → {Folder}
- Description:
Adds a folder of the given type.
- Source:
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 Folder object for the added folder.
- Type
- Folder
get(path) → {Folder}
- Description:
Returns a Folder object for the given path.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
path |
String | Absolute path of the folder in virtual file-system. |
Returns:
- Type
- Folder
list() → {Array.<Folder>}
- Description:
Returns an array of Folder objects representing all root folders in the virtual file-system including inbuilt ones.
- Source:
Returns:
- Type
- Array.<Folder>
listAll() → {Array.<Folder>}
- Description:
Returns an array of Folder objects representing all folders in the virtual file-system regardless of their location in the folder-tree including inbuilt ones.
- Source:
Returns:
- Type
- Array.<Folder>
listWindowsDirectory(path, includeFilesopt) → {Array.<WindowsFile>}
- Description:
Returns a listing of the given Windows folder (in the Windows file-system) in the form of an array of WindowsFile objects.
- Source:
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.<WindowsFile>
move(folder, parentFolder)
- Description:
Moves the given folder to another path.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
folder |
String | Folder | Virtual file-system path or Folder object of the folder to be moved. |
parentFolder |
String | Folder | Virtual file-system path or 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.
- Source:
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
folder |
String | Folder | Virtual file-system path or Folder object of the folder to be deleted. |
||
recursive |
Boolean |
<optional> |
false
|
If true, the folder will be deleted recursively. |