SysBridge API - Calls
File System
Performing file system operations
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 Response Call (you send)
JSON
CallResult
JSON
|
Example 2 - Error Response Request can be failed for multiple reasons that can be determined from the returned error response. Call (you send)
JSON
CallResult
JSON
|
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 Response Call (you send)
JSON
CallResult
JSON
|
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 Response Call (you send)
JSON
CallResult
JSON
|
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 Response Call (you send)
JSON
CallResult
JSON
|
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 Response Call (you send)
JSON
CallResult
JSON
|
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 Response Call (you send)
JSON
CallResult
JSON
|
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 1 Call (you send)
JSON
CallResult
JSON
|
Example 1 - Params payload format 2 Call (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
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 selectoin Call (you send)
JSON
CallResult
JSON
|
Example 2 - Success response multiple selections Call (you send)
JSON
CallResult
JSON
|
Example 3 - Failure response Call (you send)
JSON
CallResult
JSON
|
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 selectoin Call (you send)
JSON
CallResult
JSON
|
Example 2 - Success response multiple selections Call (you send)
JSON
CallResult
JSON
|
Example 3 - Failure response Call (you send)
JSON
CallResult
JSON
|
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 response Call (you send)
JSON
CallResult
JSON
|
Example 2 - Cancel Call (you send)
JSON
CallResult
JSON
|
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 - Success Call (you send)
JSON
CallResult
JSON
|