Creates the given directory path, as well as intermediate directories.
        Catches any I/O exception, returning False in that case; otherwise,
        True is returned.
10164
def safeMakeDirs(path, mode=0o777):
        
        try:
            os.makedirs(path, mode)

            return True
        except OSError:
            return False
497829
private File withPath(Path path, File dir) {
        return new File(dir, path.getPath());
    }
951651
def _create_path_if_not_exist(self, path):
        
        if path and not os.path.exists(path):
            os.makedirs(path)
663800
def create_dir(path):
    
    full_path = abs_path(path)
    if not os.path.exists(full_path):
        try:
            os.makedirs(full_path)
        except OSError as e:
            # ignore the error for dir already exist.
            if e.errno != os.errno.EEXIST:
                raise
1268876
private void createDirAndFile(Path path) throws IOException {
			// create dir and file first if dir/file not exist
			File file = new File(path.toAbsolutePath().toString());
			File dir = file.getParentFile();
			if (dir != null && !dir.exists()) {
				dir.mkdirs();
			}
			if (!file.exists()) {
				file.createNewFile();
			}
	}
929095
def check_and_create_directories(paths):
    
    for path in paths:
        if os.path.exists(path):
            shutil.rmtree(path)
        os.mkdir(path)
1188380
def try_create_dir(self, path):
        
        if not os.path.exists(path):
            os.mkdir(path)
        elif not os.path.isdir(path):
            ValueError("Unable to create directory:" + path + " because a file already exists with the same name.")
238374
public static void createDirectory( File directory ) throws IOException {

		if( ! directory.exists()
				&& ! directory.mkdirs())
			throw new IOException( "The directory " + directory + " could not be created." );
	}
932291
def _makedirs(path):
    
    dirname, _ = os.path.split(path)
    try:
        os.makedirs(dirname)
    except OSError as exc:
        if exc.errno == errno.EEXIST:
            pass
        else:
            raise
419612
def mkdir(self, path):
        
        if not os.path.exists(path):
            os.makedirs(path)
518273
def _create_path(self):
        """"""

        if self.driver == 'sqlite' and 'memory' not in self.dsn and self.dsn != 'sqlite://':

            dir_ = os.path.dirname(self.path)

            if dir_ and not os.path.exists(dir_):
                try:
                    # Multiple process may try to make, so it could already
                    # exist
                    os.makedirs(dir_)
                except Exception:
                    pass

                if not os.path.exists(dir_):
                    raise Exception("Couldn't create directory " + dir_)
398981
def create_dirs(path):
    
    fname = os.path.basename(path)

    # if file name exists in path, skip the filename
    if fname.__contains__('.'):
        path = os.path.dirname(path)

    if not os.path.exists(path):
        os.makedirs(path)
1073929
def make_all_dirs(path, mode=0o777):
  
  # Avoid races inherent to doing this in two steps (check then create).
  # Python 3 has exist_ok but the approach below works for Python 2+3.
  # https://stackoverflow.com/questions/600268/mkdir-p-functionality-in-python
  try:
    os.makedirs(path, mode=mode)
  except OSError as e:
    if e.errno == errno.EEXIST and os.path.isdir(path):
      pass
    else:
      raise
  return path
248094
def create_directory(directory):
    
    try:
        os.makedirs(directory)
    except OSError, e:
        if e.errno == errno.EEXIST and os.path.isdir(directory):
            pass

    return directory
115234
def _create_dir(path):
    '''
    '''
    try:
        os.makedirs(path)
    except OSError, exc:
        if exc.errno == errno.EEXIST:
            pass
        else:
            raise
236836
def makedirs(self, path, mode=0o700):
        
        os.makedirs(os.path.join(self._archive_root, path), mode=mode)
        self.log_debug("created directory at '%s' in FileCacheArchive '%s'"
                       % (path, self._archive_root))
685486
public static File getInternalDir(Context context, String path, boolean createIfNecessary) {
		File filesDir = context.getFilesDir();
		File internalDir = new File(filesDir, path);
		if (!internalDir.exists() && createIfNecessary) {
			boolean succeed = internalDir.mkdirs();
			if (!succeed) {
				ApptentiveLog.w(UTIL, "Unable to create internal directory: %s", internalDir);
			}
		}
		return internalDir;
	}