LensStudio:ScopedStorage.js.IStorage
InterfaceInterface for safe file system operations within a specified directory
Index
Properties
Methods
Properties
path
path:
Path
Gets the path of the storage directory
Methods
createFile()
createFile(
name,content):Path
Creates a new file in the storage directory
Parameters
| Parameter | Type |
|---|---|
name | string |
content | string | Uint8Array<ArrayBufferLike> |
Returns
readBytes()
readBytes(
path):Uint8Array<ArrayBufferLike>
Reads a file as a byte array
Parameters
| Parameter | Type |
|---|---|
path | string | Path |
Returns
Uint8Array<ArrayBufferLike>
readFile()
readFile(
path):string
Reads a file as a string
Parameters
| Parameter | Type |
|---|---|
path | string | Path |
Returns
string
unpackContent()
unpackContent(
archivePath):Path
Unpacks a ZIP archive into the storage directory
Parameters
| Parameter | Type |
|---|---|
archivePath | string | Path |