Properties
| Property | Type | Description |
|---|---|---|
| applicationPaths | Config2_ApplicationPaths | Application paths object providing CompleteFTP application directory paths. |
Methods
| Method | Returns | Description |
|---|---|---|
| add() | Config2_Folder | Adds a folder of the given type. |
| get() | Config2_Folder | Returns a Config2_Folder object for the given path. |
| list() | Array.<Config2_Folder> | Returns an array of Config2_Folder objects representing all root folders in the virtual file-system including inbuilt ones. |
| listAll() | Array.<Config2_Folder> | Returns an array of Config2_Folder objects representing all folders in the virtual file-system regardless of their location in the folder-tree including inbuilt ones. |
| listWindowsDirectory() | Array | Returns a listing of the given Windows folder (in the Windows file-system) in the form of an array of objects with name, lastWriteTime, and type properties. |
| move() | void | Moves the given folder to another path. |
| remove() | void | Deletes the given folder. |
Property Details
applicationPaths :Config2_ApplicationPaths
- Description:
Application paths object providing CompleteFTP application directory paths.
Application paths object providing CompleteFTP application directory paths.
Type:
Method Details
add(path, type, mappingPath) → {Config2_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. Notes:
|
Returns:
A Config2_Folder object for the added folder.
- Type
- Config2_Folder
get(path) → {Config2_Folder|null}
- Description:
Returns a Config2_Folder object for the given path.
Parameters:
| Name | Type | Description |
|---|---|---|
path |
String | Absolute path of the folder in virtual file-system. |
Returns:
Folder object or null if not found.
- Type
- Config2_Folder | null
list() → {Array.<Config2_Folder>}
- Description:
Returns an array of Config2_Folder objects representing all root folders in the virtual file-system including inbuilt ones.
Returns:
Array of root folder objects.
- Type
- Array.<Config2_Folder>
listAll() → {Array.<Config2_Folder>}
- Description:
Returns an array of Config2_Folder objects representing all folders in the virtual file-system regardless of their location in the folder-tree including inbuilt ones.
Returns:
Array of all folder objects.
- Type
- Array.<Config2_Folder>
listWindowsDirectory(windowsPath, includeFiles) → {Array}
- Description:
Returns a listing of the given Windows folder (in the Windows file-system) in the form of an array of objects with name, lastWriteTime, and type properties.
Parameters:
| Name | Type | Description |
|---|---|---|
windowsPath |
String | Absolute path of the folder in the Windows file-system. |
includeFiles |
Boolean | If true, files within the folder are also included. |
Returns:
Array of objects with name, lastWriteTime, and type properties.
- Type
- Array
move(folder, parentFolder)
- Description:
Moves the given folder to another path.
Parameters:
| Name | Type | Description |
|---|---|---|
folder |
String | Config2_Folder | Virtual file-system path or Config2_Folder object of the folder to be moved. |
parentFolder |
String | Config2_Folder | Virtual file-system path or Config2_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, recursive)
- Description:
Deletes the given folder.
Parameters:
| Name | Type | Description |
|---|---|---|
folder |
String | Config2_Folder | Virtual file-system path or Config2_Folder object of the folder to be deleted. |
recursive |
Boolean | If true, the folder will be deleted recursively. |