Scripting API / core/local-app/LocalFolderApi
core/local-app/LocalFolderApi
Classes
LocalFolderApi
Methods
create()
create(
folderPath):Promise<void>
Creates a folder and all non-existent parent folder.
Parameters
| Parameter | Type | Description |
|---|---|---|
folderPath |
string |
The path of the folder to create. |
Returns
Promise<void>
delete()
delete(
folderPath):Promise<void>
Deletes a folder.
Parameters
| Parameter | Type | Description |
|---|---|---|
folderPath |
string |
The path of the folder to delete. |
Returns
Promise<void>
search()
search(
folderPath,searchTerm,includeSubFolders):Promise<string[]>
Searches a folder and all sub-folders for files and folders that match the search term.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
folderPath |
string |
undefined |
The path of the folder to search. |
searchTerm |
string |
undefined |
The search string to match against the names of files and folders. This parameter can contain a combination of valid literal path and wildcard (* and ?) characters, but it doesn't support regular expressions. |
includeSubFolders |
boolean |
false |
Use true to include the current folder and all its subfolders in the search operation. This includes reparse points such as mounted drives and symbolic links. Use false (default) to include only the top folder in the search. |
Returns
Promise<string[]>
A list of file and folder paths.