File System
Performing file system operations
ListFiles
ListFiles
Return all files in the given directory.
Params
|
Key |
Type |
Default |
Description |
|---|---|---|---|
|
Path |
STRING |
- |
Absolute path of the directory |
|
Recursive |
BOOLEAN optional |
|
Should include directories in the given path. |
Examples
Example 1 - Success ResponseCall (you send) JSON
CallResult JSON
|
Example 2 - Error ResponseRequest can be failed for multiple reasons that can be determined from the returned error response. Call (you send) JSON
CallResult JSON
|
FileExist
FileExist
Given path, check if the path exists and resolves to a file.
Params
|
Key |
Type |
Default |
Description |
|---|---|---|---|
|
Path |
STRING |
- |
Absolute path of the file |
Examples
Example 1 - Success ResponseCall (you send) JSON
CallResult JSON
|
DirExist
DirExist
Given path, check if the path exists and resolves to a directory.
Params
|
Key |
Type |
Default |
Description |
|---|---|---|---|
|
Path |
STRING |
- |
Absolute path of the directory |
Examples
Example 1 - Success ResponseCall (you send) JSON
CallResult JSON
|
IsDirEmpty
IsDirEmpty
Given path, check if the path resolves to an empty directory
Params
|
Key |
Type |
Default |
Description |
|---|---|---|---|
|
Path |
STRING |
- |
Absolute path of the directory |
Examples
Example 1 - Success ResponseCall (you send) JSON
CallResult JSON
|
CreateDir
CreateDir
Given path, check if the path resolves to an empty directory
Params
|
Key |
Type |
Default |
Description |
|---|---|---|---|
|
Path |
STRING |
- |
Absolute path of the directory to create |
Examples
Example 1 - Success ResponseCall (you send) JSON
CallResult JSON
|
MoveDir
MoveDir
Move directories on the file system.
Params
|
Key |
Type |
Default |
Description |
|---|---|---|---|
|
Source |
STRING |
- |
Absolute path of the source directory |
|
Destination |
STRING |
- |
Absolute path to the destination. Destination directory should already exist to avoid error response or include |
|
CreateDestination |
BOOLEAN optional |
|
Weather to create the destination folder if does not exist already. |
|
Recursive |
BOOLEAN optional |
|
By default, only files are moved from |
|
Mode |
STRING optional |
|
Options: By default, directory is copies to destination. To permanently move source to destination, pass this parameter as |
Examples
Example 1 - Success ResponseCall (you send) JSON
CallResult JSON
|
MoveFiles
Moves
Move files from one folder to another.
Params
Params for this request can be passed in any of the given tow formats.
|
Key |
Type |
Default |
Description |
|---|---|---|---|
|
Files |
STRING Array |
- |
Absolute path of the files |
|
Destination |
STRING |
- |
Absolute path to the destination. Destination directory should already exist to avoid error response or include |
|
CreateDestination |
BOOLEAN optional |
|
Weather to create the destination folder if does not exist already. |
|
IgnoreMissing |
BOOLEAN optional |
|
By default, an error response will be returned if any of the files in |
|
Mode |
STRING optional |
|
Options: Weather to copy or move permanently. |
|
Key |
Type |
Default |
Description |
|---|---|---|---|
|
Files |
JSON
|
- |
- |
|
Destination |
STRING |
- |
Absolute path to the destination. Destination directory should already exist to avoid error response or include |
|
CreateDestination |
BOOLEAN optional |
|
Weather to create the destination folder if does not exist already. |
|
IgnoreMissing |
BOOLEAN optional |
|
By default, an error response will be returned if any of the files in |
|
Mode |
STRING optional |
|
Options: Weather to copy or move permanently. |
Examples
Example 1 - Params payload format 1Call (you send) JSON
CallResult JSON
|
Example 1 - Params payload format 2Call (you send) JSON
CallResult JSON
|