Create output directory

@param {Function} done
765922
function createOutputDirs(done) {
			o.stylesheets.forEach(function(stylesheet) {
				mkdirp.sync(option(o.destCssPaths, stylesheet));
			});
			mkdirp.sync(o.dest);
			done();
		}
747269
function getOutputDir() {
	const outputOptionIdx = process.argv.indexOf('-o') !== -1 ? process.argv.indexOf('-o') : process.argv.indexOf('--output-file'),
		argsLength = process.argv.length,
		outputDirOption = '--outputDirectory=';

	if (process.argv[1].includes('grunt')) {
		for (var i = 2; i < argsLength; i++) {
			if (process.argv[i].includes(outputDirOption)) {
				return `/${process.argv[i].replace(outputDirOption, '')}`;
			}
		}
		return '/reports/'; // defaults to a reports folder if nothing else is found
	} else if (outputOptionIdx !== -1) {
		return `/${process.argv[outputOptionIdx + 1].split('/')[0]}/`;
	}

	return '';
}
389433
function createFiles (num, dir) {
  for (var i = 0; i <= num; i++) {
    fs.writeFileSync(path.join(dir, 'test-' + i + '.txt'), String(i));
  }
}
1193407
function createOutputFolder(next) {
    var defPath         = path.join(getConfig('output.folder'), 'definition-files'),
        defPathCustom   = path.join(getConfig('output.folder'), 'definition-files-custom');

    fs.remove(defPath, function (err) {
        if (err) { next(err); }
        fs.createFile(path.join(defPath, '_Dont_add_or_edit_any_files'), function (err) {
            if (err) { next(err); }
            fs.mkdirs(defPathCustom, function (err) {
                if (err) { next(err); }
                next(null);
            });
        });
    });
}
821527
function makeme (dir,mode,cb){

    var callback = function(err,parent){
        //console.log('makeme: ',dir)
        if(err) throw new Error(err)
        if(parent){
            // replace root of dir with parent
            dir = path.join(parent,path.basename(dir));
        }
        fs.mkdir(dir,mode,function(err){
            if(err !== null){
                if( err.code === 'EEXIST'
                 && err.path === dir){
                    // make sure the directory really does exist
                    fs.stat(dir,function(staterr,stat){
                        // as mkdirP guys say, this is very strange
                        if(staterr || !stat.isDirectory()){
                            if(cb) cb(err);
                        }
                        if(cb) cb(null,dir);
                        return null;
                        // if the stat is good, do nothing.  some other processed did it
                    });

                }else{
                    console.log(err);
                    throw new Error(err);
                }
            }else{
                if(cb) cb(null,dir);
            }
            return 1;

        });
    };
    return callback;
}
598590
function (options, dir, callback) {
  var desktopSrc = path.resolve(__dirname, '../resources/desktop.ejs')
  var desktopDest = path.join(dir, 'share/applications', options.id + '.desktop')
  options.logger('Creating desktop file at ' + desktopDest)

  async.waterfall([
    async.apply(generateTemplate, options, desktopSrc),
    async.apply(fs.outputFile, desktopDest)
  ], function (err) {
    callback(err && new Error('Error creating desktop file: ' + (err.message || err)))
  })
}
556447
function (directoryNames) {
        var i, directoryName;

        for (i = 0; i < directoryNames.length; i++) {
            directoryName = directoryNames[i];

            mkdirp.sync(directoryName);
            // make output similar to yeoman's
            console.log('   ' + chalk.green('create') + ' ' + directoryName.replace('/', '\\') + '\\');
        }
    }
219872
function (next) {

        async.each(input, function (path, done) {
            fs.stat(path, function (err, stats) {
                if (err) return done(err);
                if (stats.isDirectory())
                    return done("Cannot have a directory as input");
                done();
            });
        }, next);

    }
471763
function createDirectory(options) {
  return new Promise(function(resolve, reject) {
    mkdirp( options.directory, function (err) {
      if(err && err.code !== 'EEXIST') {
        reject(err);
      } else {
        resolve(options);
      }
    });
  });
}
871758
function getOutputDir(output) {
  var arr = output.split(path.sep);
  arr.pop();
  return arr.join(path.sep);
}
193314
def create_done_path(done_path, uid=-1, gid=-1):
    """"""
    with open(done_path, 'wb'):
        pass
    os.chown(done_path, uid, gid);
434215
function build(outputDir) {
    let exec = require("child_process").exec;
    let elmFile = path.join(argv.src, argv.elmFile);
    let cmd = "elm-make " + elmFile + " --yes --output " + argv.output + "/" + argv.language + ".js";
    console.log(cmd);
    exec(cmd, (err, stdout, stderr) => {
        if(err) {
            console.error(err);
            return;
        }
        console.log(stdout);
    });
}
777654
function(results, filePath) {

  var destDir = path.dirname(filePath);

  if (!grunt.file.exists(destDir)) {
    grunt.file.mkdir(destDir);
  }

  grunt.file.write(filePath, results);
  grunt.log.ok('File "' + filePath + '" created.');
}
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));
}
142857
def init(*, output_dir=FS_DEFAULT_OUTPUT_DIR, dry_run=False, **kwargs):
    
    # Output directory
    global _output_dir
    _output_dir = output_dir

    # Dry run mode
    global _dry_run
    _dry_run = dry_run

    # Type checks
    utils.chkstr(_output_dir, 'output_dir')

    # log the thing
    log.msg("Output directory will be: {output_dir}"
            .format(output_dir=_output_dir))

    # Create output directory if it does not exist
    if not os.path.exists(_output_dir):
        log.msg_warn("Output path '{out_dir}' does not exist, creating it ..."
                     .format(out_dir=_output_dir))
        if not _dry_run:
            # create the actual root output directory
            os.makedirs(_output_dir)
            # set folder permissions to 0770
            os.chmod(_output_dir, stat.S_IRWXU | stat.S_IRWXG)
1255923
function(done) {
    this.async = true;
    var self = this;

    function finish(err, file) {
      var hasCallback = (typeof done === 'function');
      if (err && !hasCallback) return self.emit('error', err);
      if (err) return done(err);
      done(null, file);
    }

    if (this.data) {
      this.createFile(this.file, this.uri, this.file, this.data, finish).parse(finish);
    } else {
      this.resolve(this.file, this.cwd, function(err, file) {
        if (err) return finish(err);
        file.parse(finish);
      });
    }

    return this;
  }
1325070
function createDir(dir) {
  return new RSVP.Promise(function(resolve, reject) {
    // Delete the temporary compiled docs directory.
    mkdirp(dir, function (err) {
      if (err) {
        reject(err);
      } else {
        console.log('Created directory ' + dir);
        resolve();
      }
    });
  });
}