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. |
|
Filter |
String Array optional |
- |
An array of strings representing filters. Only the files with extension present in the provided array will be returned. |
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
|
Example 3 - Success Response with FilterCall (you send) JSON
CallResult JSON
|
ListDir
ListDir
List file and folder information.
Params
|
Key |
Type |
Default |
Description |
|---|---|---|---|
|
Path |
STRING |
- |
Absolute path of the directory |
Examples
Example 1 - Success ResponseCall (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
|
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. |
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. |
|
MoveInDirectory |
BOOLEAN |
|
When |
Response
Example 1 - SuccessCall (you send) JSON
CallResult JSON
|
Misc
OpenWithDefaultApp
OpenWithDefaultApp
Try to open given path with the default application.
Payload
{
"Path": string
}
Field Descriptions
|
Field |
Type |
Default |
Description |
|---|---|---|---|
|
Path |
STRING |
Required |
Path can be a Url which will be opened in the default browser Or a file path which will be opened in the default app. |
Response
Example 1 - Open URL in default browserCall (you send) JSON
CallResult JSON
|
Example 1 - Open file path in default applicationCall (you send) JSON
CallResult JSON
|