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
|
System Dialog API
The System Dialog API provides endpoints for interacting with system-level dialogs, such as file selection, folder selection, and save file dialogs.
AskFileSelection
AskFileSelection
Opens a file selection dialog and returns the selected file(s).
Payload
{
"Filter": [
{
"Name": string,
"Extensions": string[]
}
],
"Title": string,
"Directory": string,
"CaptureWindowAsParent": boolean,
"Multiple": boolean
}
Field Descriptions
|
Field |
Type |
Default |
Description |
|---|---|---|---|
|
Filter |
Array optional |
All file types/extension can be selected |
The filters to limit user to only select files of specified type |
|
Title |
STRING optional |
Choose file |
The title of the file dialog. |
|
Directory |
STRING optional |
- |
The initial directory to open the file dialog in. |
|
CaptureWindowAsParent |
BOOLEAN optional |
|
Whether to capture the current window as the parent of the dialog. |
|
Multiple |
BOOLEAN optional |
|
Whether to allow multiple file selection. |
Response
Example 1 - Success response single selectoinCall (you send) JSON
CallResult JSON
|
Example 2 - Success response multiple selectionsCall (you send) JSON
CallResult JSON
|
Example 3 - Failure responseCall (you send) JSON
CallResult JSON
|
AskFolderSelection
AskFolderSelection
Opens a folder selection dialog and returns the selected folder(s).
Payload
{
"Title": string,
"Directory": string,
"CaptureWindowAsParent": boolean,
"Multiple": boolean
}
Field Descriptions
|
Field |
Type |
Default |
Description |
|---|---|---|---|
|
Title |
STRING optional |
Choose folder |
The title of the file dialog. |
|
Directory |
STRING optional |
- |
The initial directory to open the file dialog in. |
|
CaptureWindowAsParent |
BOOLEAN optional |
|
Whether to capture the current window as the parent of the dialog. |
|
Multiple |
BOOLEAN optional |
|
Whether to allow multiple file selection. |
Response
Example 1 - Success response single selectoinCall (you send) JSON
CallResult JSON
|
Example 2 - Success response multiple selectionsCall (you send) JSON
CallResult JSON
|
Example 3 - Failure responseCall (you send) JSON
CallResult JSON
|
AskSaveFile
AskSaveFile
Opens a save file dialog and returns the selected save path.
Payload
{
"Title": string,
"Directory": string,
"Filters": [
{
"Name": string,
"Extensions": string[]
}
],
"FileName": string,
"CaptureWindowAsParent": boolean
}
Field Descriptions
|
Field |
Type |
Default |
Description |
|---|---|---|---|
|
Title |
STRING optional |
Choose folder |
The title of the file dialog. |
|
Directory |
STRING optional |
- |
The initial directory to open the file dialog in. |
|
FileName |
STRING optional |
|
Default filled file name |
|
Filters |
Array optional |
All |
The filters to limit user to only save files of specified type. NOTE: If no filter is provided and HINT: Provide one filter or pass |
|
CaptureWindowAsParent |
BOOLEAN optional |
|
Whether to capture the current window as the parent of the dialog. |
|
Multiple |
BOOLEAN optional |
|
Whether to allow multiple file selection. |
Response
Example 1 - Success responseCall (you send) JSON
CallResult JSON
|
Example 2 - CancelCall (you send) JSON
CallResult JSON
|
RevealPath
RevealPath
Reveals a file or folder in the system's file explorer.
Payload
{
"Path": string
}
Field Descriptions
|
Field |
Type |
Default |
Description |
|---|---|---|---|
|
Path |
STRING |
Required |
The absolute path of the file or folder to reveal. |
Response
Example 1 - SuccessCall (you send) JSON
CallResult JSON
|