|
|
|
|
Functions
Events
Variables
Libraries
|
|
Syntax
| mio_file_save(targetFolder, Filename, Data, 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 | Data | Content 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
Saves an alphanumeric data to disk.
This file can be stored in one of the following folder:
TEMP: MioEngine temporary folder. May be lost when the application is closed.
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. The files are removed when the application is closed.
You can specify sub-folders using the following syntax:
RSC:MyFolder |
JavaScript Sample Code
mio_file_save("RSC:MyFolder", "myFile.txt", "This is the content of my file", "myFile_saved")
function myFile_saved(status) {
if(status) {
mio_alert("File saved!");
}
} |
|
|
|