Description
Supported Script Types: Interface Scripts • Client Entity Scripts • Avatar Scripts • Server Entity Scripts • Assignment Client Scripts
TheFile
API provides some facilities for working with the file system.Methods
Name | Return Value | Summary |
---|---|---|
convertUrlToPath
|
string |
Extracts a filename from a URL, where the filename is specified in the query part of the URL as |
getTempDir
|
string |
Creates a new, unique directory for temporary use. |
runUnzip
|
None |
Unzips a file in the local file system to a new, unique temporary directory. |
Signals
Name | Summary |
---|---|
unzipResult
|
Triggered when runUnzip completes. |
Method Details
(static) convertUrlToPath( url ) → {string}
Returns: The filename specified in the URL; an empty string if no filename is specified. |
||||||
---|---|---|---|---|---|---|
Extracts a filename from a URL, where the filename is specified in the query part of the URL as Parameters
Example
|
(static) getTempDir( ) → {string}
Returns: The path of the newly created temporary directory. |
---|
Creates a new, unique directory for temporary use. Example
|
(static) runUnzip( path, url, autoAdd, isZip, isBlocks ) | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Unzips a file in the local file system to a new, unique temporary directory. Parameters
Example
|
Signal Details
unzipResult(
zipFile,
unzipFiles,
autoAdd,
isZip,
isBlocks
)
Returns: Signal |
||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Triggered when runUnzip completes. Parameters
|