LensStudio:Shell
ModuleThe LensStudio:Shell module for Lens Studio plugins.
Before using anything in this namespace, make sure to import LensStudio:Shell.
Example
// LensStudio:Shell provides utilities for interacting with the OS shell.
const Shell = await import('LensStudio:Shell');
// openUrl(baseUrl, queryData) opens a URL in the default browser.
// queryData is appended as query parameters.
const opened = Shell.openUrl('https://docs.snap.com', {});
console.log('openUrl returned:', opened);
// showItemInFolder(path) reveals a file or folder in the system explorer.
const examplePath = new Editor.Path('/tmp');
Shell.showItemInFolder(examplePath);
console.log('Revealed path in file explorer:', examplePath.toString());
Functions
| Function | Description |
|---|---|
| openUrl | Open a URL with optional query parameters in the default browser. |
| showItemInFolder | Reveal a file or folder in the system file explorer. |