Create a new folder in a Solid system,
335642
function (newPaneOptions) {
    var kb = UI.store
    var newInstance = newPaneOptions.newInstance || kb.sym(newPaneOptions.newBase)
    var u = newInstance.uri
    if (u.endsWith('/')) {
      u = u.slice(0, -1) // chop off trailer
    }// { throw new Error('URI of new folder must end in "/" :' + u) }
    newPaneOptions.newInstance = kb.sym(u + '/')

    // @@@@ kludge until we can get the solid-client version working
    // Force the folder by saving a dummy file inside it
    return kb.fetcher.webOperation('PUT', newInstance.uri + '.dummy')
      .then(function () {
        console.log('New folder created: ' + newInstance.uri)

        return kb.fetcher.delete(newInstance.uri + '.dummy')
      })
      .then(function () {
        console.log('Dummy file deleted : ' + newInstance.uri + '.dummy')
/*
        return kb.fetcher.createContainer(parentURI, folderName) // Not BOTH ways
      })
      .then(function () {
*/
        console.log('New container created: ' + newInstance.uri)
        return newPaneOptions
      })
  }
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)) )
422268
def add_folder(self, folder):
        
        if folder in self.folders:
            return

        self.folders.add(folder)
        
        for subfolder, junk, filenames in os.walk(folder):
            for filename in filenames:
                name, ext = os.path.splitext(filename)
                if ext in self.exts:
                    self.images.append(
                        os.path.join(subfolder, filename))
385348
def _create_project(self, path):
        """"""
        self.open_project(path=path)
        self.setup_menu_actions()
        self.add_to_recent(path)
205173
def makedirs(path, mode=0o777, exist_ok=False):
    """"""
    os.makedirs(path, mode, exist_ok)
1087616
def create(self):
        """"""
        self.buffer = []
        self.buf_count = 0
        if not self.directory.exists: self.directory.create()
        self.open('w')
        return self
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_)
85337
def _new_temp_file(self, hint='warcrecsess'):
        ''''''
        return wpull.body.new_temp_file(
            directory=self._temp_dir, hint=hint
        )
171882
function createDirs(next) {
    var dirs = common.directories.normalize(
      common.mixin({}, flatiron.constants.DIRECTORIES, { '#ROOT': root }),
      JSON.parse(fs.readFileSync(path.join(scaffold, 'directories.json'), 'utf8'))
    );

    Object.keys(dirs).forEach(function (name) {
      app.log.info('Creating directory ' + name.grey);
    });

    common.directories.create(dirs, next);
  }
1374542
def create_dir(self, jbfile):
        
        try:
            jbfile.create_directory()
        except os.error:
            self.statusbar.showMessage('Could not create path: %s' % jbfile.get_path())
649805
def create(self, acl=None):
        ''''''
        parent, name = getParentAndBase(self.path)
        json = { 'name': name }
        if acl is not None:
            json['acl'] = acl.to_api_param()
        response = self.client.postJsonHelper(DataDirectory._getUrl(parent), json, False)
        if (response.status_code != 200):
            raise DataApiError("Directory creation failed: " + str(response.content))
835933
def _create_structure(self):
        """"""

        # Ensure that the specified path does not exist and create it.
        if os.path.exists(self._abspath):
            raise(StorageBrokerOSError(
                "Path already exists: {}".format(self._abspath)
            ))

        # Make sure the parent directory exists.
        parent, _ = os.path.split(self._abspath)
        if not os.path.isdir(parent):
            raise(StorageBrokerOSError(
                "No such directory: {}".format(parent)))

        os.mkdir(self._abspath)

        # Create more essential subdirectories.
        for abspath in self._essential_subdirectories:
            if not os.path.isdir(abspath):
                os.mkdir(abspath)
828888
private void createLibFolder() throws IOException {
        if(!Files.exists(libLocation.toPath()))
            Files.createDirectories(libLocation.toPath());
    }
1100987
function createTree (context, folder) {
  const tree = []
  const files = []

  let directoryContents = []

  try {
    directoryContents = fs.readdirSync(path.join(context, folder))
  } catch (error) {
    // Throw error if it’s not a permissions error
    if (error.code !== 'EACCESS') {
      throw error
    }
  }

  // Folders first
  directoryContents
    .filter(item => {
      return fs
        .lstatSync(path.join(context, folder, item))
        .isDirectory()
    })
    .forEach(item => {
      const children = createTree(context, path.join(folder, item))

      // Don’t add current directory to tree if it has no children
      if (children.tree.length) {
        tree.push({
          name: formatName(item),
          children: children.tree
        })
      }

      files.push(...children.files)
    })

  // Files second
  directoryContents
    .filter(item => item.endsWith('.njk'))
    .forEach(item => {
      const basename = path.basename(item, '.njk')
      const filePath = formatPath(folder, item)
      const configPath = path.join(context, folder, basename + '.json')

      let config

      try {
        config = JSON.parse(fs.readFileSync(configPath))
      } catch (error) {
        config = {}
      }

      // Don’t add current component to tree if it’s hidden
      if (config.hidden) {
        return
      }

      tree.push({
        name: formatName(basename),
        path: filePath.slice(0, -4),
        config
      })

      files.push(filePath)
    })

  return { files, tree }
}
996582
def create_new_file(self, current_path, title, filters, create_func):
        """"""
        if current_path is None:
            current_path = ''
        if osp.isfile(current_path):
            current_path = osp.dirname(current_path)
        self.redirect_stdio.emit(False)
        fname, _selfilter = getsavefilename(self, title, current_path, filters)
        self.redirect_stdio.emit(True)
        if fname:
            try:
                create_func(fname)
                return fname
            except EnvironmentError as error:
                QMessageBox.critical(self, _("New file"),
                                     _("<b>Unable to create file <i>%s</i>"
                                       "</b><br><br>Error message:<br>%s"
                                       ) % (fname, to_text_string(error)))
1106556
def _muaprocessnew(self):
        """"""
        foldername = self._foldername("new")
        files = self.filesystem.listdir(foldername)
        for filename in files:
            if filename == "":
                continue
            curfilename = self._foldername(joinpath("new", filename))
            newfilename = joinpath(
                self._cur,
                "%s:2,%s" % (filename, "")
                )
            self.filesystem.rename(curfilename, newfilename)
258640
def _create(self):
        """"""

        self._raise_if_none()
        if not self._exists:
            mkdir_p(self.path)
            self._exists = True