|
|
|
|
Functions
Events
Variables
Libraries
|
|
Syntax
| mio_file_load(targetFolder, Filename, callback) |
Parameters
| STRING | targetFolder | Path to the file, built as follow: TEMP or TEMP:subfolder APP or APP:subfolder RSC or RSC:subfolder
| | STRING | Filename | Name of the file.
| | STRING | callback | Name of the function to be called once the file is loaded. The callback function is called with the status as argument. |
Return value
No value is returned.
Description
Loads a file from disk.
This file must be stored in one of the following folders:
TEMP: MioEngine temporary folder. This folder may be removed when the application is not running.
A file stored in the MioEngine temporary folder can be shared between Mio applications.
APP: Folder where the application is installed. The files stored here can be retrieved when the application is closed and restarted.
If the application is not installed on the computer, the application temporary folder is used (RSC).
RSC: Application temporary folder. Files are removed when the application is closed.
You can specify sub-folders using the following syntax:
RSC:MyFolder |
JavaScript Sample Code
mio_file_load("RSC:MyFolder", "myFile.txt", "myFile_loaded")
function myFile_loaded(status) {
if(status) {
mio_alert(mio_file_get());
} else {
alert("File not found");
}
} |
|
|
|