filelib.mkdir.js 453 B

1234567891011121314151617
  1. //This script will create a folder on your desktop named "Hello World"
  2. console.log("Create Folder Test");
  3. var srcPath = "user:/Desktop/Hello World";
  4. //Require the image library
  5. var loaded = requirelib("filelib");
  6. if (loaded) {
  7. //Library loaded. Call to the functions
  8. var success = filelib.mkdir(srcPath);
  9. if (success){
  10. sendResp("OK")
  11. }else{
  12. sendResp("Failed to resize image");
  13. }
  14. } else {
  15. console.log("Failed to load lib: filelib");
  16. }