Helper to create temporary directory.
import * as fs from 'LensStudio:FileSystem';const resourceName = "resourceName.txt";// Create a temporary dirconst tempDir = fs.TempDir.create();// Create a path that we want to write file toconst resourcePath = tempDir.path;resoursePath.append(resourceName);// Write to the filefs.writeFile(resourceName, "Hello World"); Copy
import * as fs from 'LensStudio:FileSystem';const resourceName = "resourceName.txt";// Create a temporary dirconst tempDir = fs.TempDir.create();// Create a path that we want to write file toconst resourcePath = tempDir.path;resoursePath.append(resourceName);// Write to the filefs.writeFile(resourceName, "Hello World");
Readonly
Helper to create temporary directory.
Example