EasyManua.ls Logo

Panasonic HMWIN - Page 373

Panasonic HMWIN
440 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Read file
object fs.readFile(strfile [,strFlag]);
Opens the strFile file in read mode, reads its contents and returns it.
Parameter Description
strFile File name string
strFlag Read file mode:
b” reads and returns as binary file (otherwise returns a text file)
Write file
fs.writeFile(strFile, fileData, [strFlag]);
Creates the strFile file if not present. Opens the strFile file in write mode and writes the data fileData to the file.
Parameter Description
strFile File name string
fileData Data to be write on the file in byte array
strFlag Write file mode:
l a”: appends fileData to the end of the text file
l r”: replaces the contents of the file with fileData
l ab”: appends fileData to the end of the binary file
l rb”: replaces the contents of the binary file with fileData
Default flag is for writing text file in append and write mode. File path will be created if not present.
Returns -1 if write error occurs.
Append file
int fs.appendFile(strFile, fileData);
If the files does not exist creates it, otherwise append to existing file. Returns the number of character written or -1 on error.
Parameter Description
strFile File name string
fileData Data to be write on the file in byte array
File exists
boolean fs.exists(strPath)
Returns true if the file or folder exists at strPath.
HMWIN Studio |User Manual| v206 (2017-06-30) | EN| © 2014-2017 Panasonic Electric Works Europe AG
371
35 JavaScript

Table of Contents

Related product manuals