filelib.file.js 332 B

123456789
  1. console.log("File Read Write Test");
  2. requirelib("filelib");
  3. if (filelib.writeFile("user:/Desktop/test.txt","Hello World! This is a testing message to write")){
  4. //Write file succeed.
  5. var fileContent = filelib.readFile("user:/Desktop/test.txt");
  6. sendResp("File content: " + fileContent);
  7. }else{
  8. SendResp("Failed to write file");
  9. }