SHARE
TWEET

Untitled

a guest Apr 21st, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // test if extension folder exists
  2. fs.stat(info.EXTENSION_NAME, (err, stats) => {
  3.     printMessage("test if extension folder exists, err: " + err + ", stats: " + stats);
  4.     printMessage(err.code);
  5.     if (err && err.code == "ENOENT") {
  6.         // create extension directory
  7.         fs.mkdir(info.EXTENSION_NAME, (err) => {
  8.             printMessage("create extension directory, err: " + err);
  9.  
  10.             initFiles();
  11.         })
  12.     } else {
  13.         initFiles();
  14.     }
  15. })
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top