This is the Base-Plugin. It supports operations on standard filesystems and the AFS filesystem.
Create a directory.
| Code | Description |
|---|---|
| -1 | A directory with the given name already exists. |
| -2 | Can’t create the folder. |
| -3 | Can’t create folder recursively. |
| -4 | Wrong directory name. |
| -9 | Permission denied. |
Delete a directory.
| Code | Description |
|---|---|
| -1 | Folder doesn’t exists. |
| -2 | The folder with the given name is not a folder. |
| -3 | Can’t remove the folder. |
| -4 | Wrong directory name. |
| -9 | Permission denied. |
List all subfolders
| Code | Description |
|---|---|
| -1 | Folder doesn’t exists. |
| -2 | Wrong directory name. |
| -3 | Can’t open dir. |
| -9 | Permission denied. |
Copy a file
Boolean overwrite
| Code | Description |
|---|---|
| -1 | Source file doesn’t exists. |
| -2 | Destination file exists. |
| -3 | An error occurs. |
| -4 | Source is directory. |
| -9 | Permission denied. |
Delete a file.
| Code | Description |
|---|---|
| -1 | File doesn’t exists. |
| -2 | Can’t delete the file. |
| -3 | Wrong filename. |
| -9 | Permission denied. |
Gets a list of files and subfolders in a folder
Example:
[
{
'type': 'file',
'name': 'File1.html',
'path': '/tmp',
'size': 10,
'mime-type': 'text/html',
'isDir': false
},
{
'type': 'file',
'name': 'Folder',
'path': '/tmp',
'size': 0,
'mime-type': '',
'isDir': true
},
]
| Code | Description |
|---|---|
| -1 | Dir doesn’t exists. |
| -2 | Wrong path. |
| -9 | Permission denied. |
Move a file from one location to an other.
Boolean overwrite
| Code | Description |
|---|---|
| -1 | The source file doesn’t exists. |
| -2 | A file with the destination name exists and the overwrite flag is not set. |
| -3 | An error occurs. |
| -4 | Wrong filename. |
| -9 | Permission denied. |
Rename a file or a folder
| Code | Description |
|---|---|
| -1 | Source file doesn’t exists. |
| -2 | Wrong filename for source. |
| -3 | Wrong filename for destination. |
| -4 | Error while renaming the file. |
| -9 | Permission denied. |