LensStudio:FileSystem.TempDir
ClassHelper to create temporary directory.
Index
Properties
Methods
Example
import * as fs from 'LensStudio:FileSystem';
const resourceName = "resourceName.txt";
// Create a temporary dir
const tempDir = fs.TempDir.create();
// Create a path that we want to write file to
const resourcePath = tempDir.path;
resoursePath.append(resourceName);
// Write to the file
fs.writeFile(resourceName, "Hello World");
Extends
Properties
path
readonlypath:Path
Filesystem path to the temporary directory.
Methods
create()
staticcreate():TempDir
Creates a temporary directory which will be deleted the moment all references to it disappears.
Returns
TempDir
getTypeName()
staticgetTypeName():string
Returns the type name of this class.
Returns
string
Overrides
getTypeName()
getTypeName():
string
Returns the name of this object's type.
Returns
string
Inherited from
isOfType()
isOfType(
type):boolean
Returns true if the object is of the specified type.
Parameters
| Parameter | Type |
|---|---|
type | string |
Returns
boolean
Inherited from
isSame()
isSame(
other):boolean
Returns true if this object refers to the same instance as the given object.
Parameters
| Parameter | Type |
|---|---|
other | ScriptObject |
Returns
boolean