This document describes the FileSystem library available in the JavaScript environment for app serivices.
Important: innovaphone uses that library for very special purposes. In general apps should not use the file system but store all data and configuration inside the database for several reasons:
Object | FileSystem |
Functions |
readFile |
The FileSystem object provides access to the file system of the app platform. All file access is done with the user account of app service.
Returns the content of a file. If the file does not exist, null is returned.
string filename | The filename. |
bool binary | Optional, default true. Specifies, if the file content shall be returned as a string or an Uint8Array. |
string/Uint8Array | The file content as a string or binary data, depending on the binary parameter. |
// read text file as a string
var content = FileSystem.readFile("filename.txt", false);