FileSystem

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:

Table of content

Object FileSystem
Functions readFile

FileSystem

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.

readFile

Returns the content of a file. If the file does not exist, null is returned.

Parameters

string filenameThe filename.
bool binaryOptional, default true. Specifies, if the file content shall be returned as a string or an Uint8Array.

Return value

string/Uint8ArrayThe 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);