read.agi 283 B

12345678910111213141516
  1. /*
  2. File Reader for Code Studio
  3. author: tobychui
  4. Require paramter: file
  5. */
  6. if (!requirelib("filelib")){
  7. sendJSONResp(JSON.stringify({
  8. error: "Unable to load filelib"
  9. }));
  10. }else{
  11. var fileContent = filelib.readFile(file);
  12. sendResp(fileContent);
  13. }