Promisified fs.mkdir
@param {string} dir directory name
@returns {string} created directory name
510495
function makeDir(dir) {
    return new Promise(function ($return, $error) {
        var res;
        return Promise.resolve(makePromise(fs.mkdir, dir, dir)).then(function ($await_8) {
            try {
                res = $await_8;
                return $return(res);
            } catch ($boundEx) {
                return $error($boundEx);
            }
        }.bind(this), $error);
    }.bind(this));
}
575939
def mkdir(self, name=None, folder_id='0'):
		''''''
		return self( 'folders', method='post', encode='json',
			data=dict(name=name, parent=dict(id=folder_id)) )
130360
function mkdirSync(dirPath) {
    // Get relative path to output
    const relativePath = dirPath.replace(`${CWD}${pathSep}`, '');
  	const dirs = relativePath.split(pathSep);
  	let currentDir = CWD;

    // Check if each dir exists, and if not, create it
    dirs.forEach(dir => {
      currentDir = path.resolve(currentDir, dir);
      if(!fs.existsSync(currentDir)) {
        fs.mkdirSync(currentDir);
      }
    });
  }
1064458
function mkdir(path, fn) {
  shell.mkdir('-p', path);
  shell.chmod(755, path);
  console.log(chalk.cyan('   create:'), path);
  if (fn) fn();
}
419434
function getKernelInfos(directory) {
  return promisify(fs.readdir, [directory]).then(files =>
    files.map(fileName => ({
      name: fileName,
      resourceDir: path.join(directory, fileName),
    }))
  );
}
702310
function newDirectoryApi(input, opts, cb) {
    var fd = new FormData(), files = [];
    var iterate = function(entries, path, resolve) {
      var promises = [];
      entries.forEach(function(entry) {
        promises.push(new Promise(function(resolve) {
          if ("getFilesAndDirectories" in entry) {
            entry.getFilesAndDirectories().then(function(entries) {
              iterate(entries, entry.path + "/", resolve);
            });
          } else {
            if (entry.name) {
              var p = (path + entry.name).replace(/^[/\\]/, "");
              fd.append(opts.name, entry, p);
              files.push(p);
            }
            resolve();
          }
        }));
      });
      Promise.all(promises).then(resolve);
    };
    input.getFilesAndDirectories().then(function(entries) {
      new Promise(function(resolve) {
        iterate(entries, "/", resolve);
      }).then(cb.bind(null, fd, files));
    });
  }
896460
function mkdirs(dir) {
  return new Promise((resolve, reject) => {
    FS.ensureDir(dir, err => {
      err ? reject(err) : resolve(dir);
    })
  });
}
533880
function mkDir(p, mode = 0777) {
    if (fs.existsSync(p)) {
        chmod(p, mode);
        return true;
    } else {
        if (mkDir(path.dirname(p))) {
            fs.mkdirSync(p, mode);
            return true;
        }
    }
}
151780
function mkdirsInner(dirnames, currentPath, callback) {
    // Check for completion and call callback
    if (dirnames.length === 0) {
      return _callback(callback);
    }

    // Make next directory
    var dirname = dirnames.shift();
    currentPath = path.join(currentPath, dirname);
    fs.mkdir(currentPath, function(err) {
      return mkdirsInner(dirnames, currentPath, callback);
    });
  }
833422
function createDir(dir) {
  const splitPath = dir.split('/');
  splitPath.reduce((path, subPath) => {
    let currentPath;
    if(subPath != '.'){
      currentPath = path + '/' + subPath;
      if (!fs.existsSync(currentPath)){
        fs.mkdirSync(currentPath);
      }
    }
    else{
      currentPath = subPath;
    }
    return currentPath
  }, '')
}
383299
function mkdir(dest, cb) {
  var dir = path.dirname(path.resolve(dest));
  utils.mkdirp(dir, function(err) {
    if (err && err.code !== 'EEXIST') {
      err.message = formatError('mkdirp cannot create directory', dir, err);
      return cb(new Error(err));
    }
    cb();
  });
}
319960
function processDirectory(directory: string) {
      // If we were rejected then we should not continue.
      if (rejected === true) {
        return;
      }
      // We are now waiting on this asynchronous task.
      waiting++;
      // Read the directory...
      fs.readdir(directory, (error, fileNames) => {
        if (error) {
          return reject(error);
        }
        // Process every file name that we got from reading the directory.
        for (let i = 0; i < fileNames.length; i++) {
          processFilePath(directory, fileNames[i]);
        }
        // We are done with this async task.
        done();
      });
    }
907052
function mkdir(dirPath, callback) {
  // Credits: https://github.com/substack/node-mkdirp

  // Recursively go through the parents.
  const recurse = () => {
    mkdir(path.dirname(dirPath), (error) => {
      if (error) {
        async.nextTick(callback, error);
        return;
      }

      // Try again.
      mkdir(dirPath, callback);
    });
  };

  // Plan B for when things seem to go wrong.
  const fallBack = () => {
    fs.stat(dirPath, (error, stat) => {
      if (error || !stat.isDirectory()) {
        async.nextTick(
          callback,
          new Error(`${dirPath}: Could not create the directory`)
        );
        return;
      }

      async.nextTick(callback, null);
    });
  };

  fs.mkdir(dirPath, (error) => {
    if (!error) {
      async.nextTick(callback, null);
      return;
    }

    switch (error.code) {
      case 'ENOENT':
        recurse();
        break;
      default:
        fallBack();
        break;
    }
  });
}
113328
function mk(dir) {
      var absDir = path.resolve(dir);
      if (!fs.existsSync(absDir)) {
        try {
          fs.mkdirSync(absDir);
        }
        catch (e) {
          mk(path.dirname(absDir));
          fs.mkdirSync(absDir);
        }
      }
    }
677250
function makeDirectories(dirs, callback) {
  var mkdir = function(dir, mkCallback) {
    exec('mkdir -p ' + dir, function(err, stdout, stderr) {
      return mkCallback(err);
    });
  };

  async.forEach(dirs, mkdir, callback);
}
1192587
function findInProject(dir, name) {
    return new Promise((resolve, reject) => {
        const fullPath = process.cwd();
        const pieces = fullPath.split(path.sep);

        let folderCounter = 0;
        let found = false;
        let folder = dir;
        while (folderCounter < pieces.length - 1 && !found) {
            if (fs.existsSync(path.join(folder, name))) {
                found = true;
            } else {
                folderCounter++;
                folder = path.join('..', folder);
            }
        }
        resolve({
            found,
            folder,
        });
    });
}
882202
private static String createIfNeeded(String dir) {
        File f = new File(dir);
        if (f.exists()) {
            return dir;
        } else {
            boolean success = f.mkdirs();
            if (success)
                return dir;
            else
                return null;
        }
    }