Create a temporary directory.
779470
public AsyncWork<File, IOException> createDirectoryAsync(String prefix) {
		return new Task.OnFile<File, IOException>(tempDir, "Create temporary directory", Task.PRIORITY_NORMAL) {
			@Override
			public File run() throws IOException {
				return createDirectorySync(prefix);
			}
		}.start().getOutput();
	}
258640
def _create(self):
        """"""

        self._raise_if_none()
        if not self._exists:
            mkdir_p(self.path)
            self._exists = True
873062
def chdir(self, directory_path, make=False):
        """"""
        if os.sep in directory_path:
            for directory in directory_path.split(os.sep):
                if make and not self.directory_exists(directory):
                    try:
                        self.session.mkd(directory)
                    except ftplib.error_perm:
                        # Directory already exists
                        pass
                self.session.cwd(directory)
        else:
            self.session.cwd(directory_path)
120100
def temporary_dir():
    
    d = tempfile.mkdtemp()
    try:
        with cd(d):
            yield d
    finally:
        if os.path.exists(d):
            shutil.rmtree(d)
86739
def rm_tempdirs():
  '''  '''
  tempdirs = [Dir.BUILD, Dir.COCOA_BUILD, Dir.LIB]
  for tempdir in tempdirs:
    if os.path.exists(tempdir):
      shutil.rmtree(tempdir, ignore_errors=True)
430863
private static String createTempDirectory(String baseDir, String fileStem) {
        Long nano = new Long(System.nanoTime());
        return baseDir + File.separator + fileStem + nano;
    }
993741
def EnsureTempDirIsSane(directory):
  """"""

  if not os.path.isabs(directory):
    raise ErrorBadPath("Directory %s is not absolute" % directory)

  if os.path.isdir(directory):
    # The temp dir already exists, we probably created it already but
    # let's check to make sure.
    if not client_utils.VerifyFileOwner(directory):
      # Just delete it, it's only temp dirs and we don't own it. If
      # this goes wrong we just raise.
      shutil.rmtree(directory)

  if not os.path.isdir(directory):
    os.makedirs(directory)

    # Make directory 700 before we write the file
    if sys.platform == "win32":
      from grr_response_client import client_utils_windows  # pylint: disable=g-import-not-at-top
      client_utils_windows.WinChmod(directory,
                                    ["FILE_GENERIC_READ", "FILE_GENERIC_WRITE"])
    else:
      os.chmod(directory, stat.S_IXUSR | stat.S_IRUSR | stat.S_IWUSR)
45189
def _create_tmp_file(config):
        """"""
        tmp_dir = tempfile.gettempdir()
        rand_fname = py23_compat.text_type(uuid.uuid4())
        filename = os.path.join(tmp_dir, rand_fname)
        with open(filename, 'wt') as fobj:
            fobj.write(config)
        return filename
1129494
protected Path createTempDirectory(String prefix) {
        try {
            return Files.createTempDirectory(tempDirectory, prefix);
        } catch (IOException e) {
            throw new AllureCommandException(e);
        }
    }
381017
public static Resource temporaryDirectory() {
      File tempDir = new File(SystemInfo.JAVA_IO_TMPDIR);
      String baseName = System.currentTimeMillis() + "-";
      for (int i = 0; i < 1_000_000; i++) {
         File tmp = new File(tempDir, baseName + i);
         if (tmp.mkdir()) {
            return new FileResource(tmp);
         }
      }
      throw new RuntimeException("Unable to create temp directory");
   }
48767
def create_dir_unless_exists(*args):
    """"""
    path = os.path.join(*args)
    if not os.path.isdir(path):
        os.makedirs(path)
61186
def make(directory):
    """"""

    if os.path.exists(directory):
        if os.path.isdir(directory):
            click.echo('Directory already exists')
        else:
            click.echo('Path exists and is not a directory')
        sys.exit()

    os.makedirs(directory)
    os.mkdir(os.path.join(directory, 'jsons'))
    copy_default_config(os.path.join(directory, 'config.yaml'))
74734
public static File createTempDirectory(String _path, String _name, boolean _deleteOnExit) {

        File outputDir = new File(concatFilePath(_path, _name));
        if (!outputDir.exists()) {
            try {
                Files.createDirectory(Paths.get(outputDir.toString()));
            } catch (IOException _ex) {
                LOGGER.error("Error while creating temp directory: ", _ex);
            }
        } else {
            return null;
        }
        if (_deleteOnExit) {
            outputDir.deleteOnExit();
        }
        return outputDir;
    }
328028
function (options, callback) {
  options.logger('Creating temporary directory')

  async.waterfall([
    async.apply(temp.mkdir, 'electron-'),
    function (dir, callback) {
      dir = path.join(dir, options.id + '_' + options.version + '_' + options.arch)
      fs.ensureDir(dir, callback)
    }
  ], function (err, dir) {
    callback(err && new Error('Error creating temporary directory: ' + (err.message || err)), dir)
  })
}
231337
def create_directory(self, path=None):
        
        if path is None:
            path = self.get_path()
        if not os.path.exists(path):
            os.makedirs(path)
6467
def local_temp_dir():
    
    path = tempfile.mkdtemp()
    yield path
    shutil.rmtree(path, ignore_errors=True)
448540
def makedirs(d):
    """"""
    if sys.version_info[0] < 3:
        from distutils.dir_util import mkpath
        mkpath(d)
    else:
        os.makedirs(d, exist_ok=True)