Create the Cache directory if it does not exist.

        Parameters
        ----------
        layer_cache
            Directory to where the layers should be cached

        Returns
        -------
        None
551797
def _create_cache(layer_cache):
        
        Path(layer_cache).mkdir(mode=0o700, parents=True, exist_ok=True)
1165697
def _load_root_directory(self):
        
        kwargs = self._req_directory(0)
        self._root_directory = Directory(api=self, **kwargs)
978670
def create_tempdir(suffix='', prefix='tmp', directory=None, delete=True):
    
    tempd = tempfile.mkdtemp(suffix=suffix, prefix=prefix, dir=directory)
    if delete:
        atexit.register(_cleanup_tempdir, tempd)
    return tempd
905778
def get_beam_cache_directory():
    
    home = os.path.expanduser("~")
    cache_dir = os.path.join(home, '.hwrt-beam-cache')
    if not os.path.exists(cache_dir):
        os.makedirs(cache_dir)
    return cache_dir
946244
def create_dir(dst):
    
    directory = os.path.dirname(dst)
    if directory and not os.path.exists(directory):
        os.makedirs(directory)
899941
def make(self):
        
        try:
            if not self.exists:
                logger.info("Creating %s" % self.path)
                os.makedirs(self.path)
        except os.error:
            pass
        return self
798348
def create_tmp_rootdir(self):
        
        if self.rootdir:
            tmp_rootdir = tempfile.mkdtemp(prefix='bcolz-')
            self._dir_clean_list.append(tmp_rootdir)
        else:
            tmp_rootdir = None
        return tmp_rootdir
1152593
private function _create_mimic_cache_dir()
    {
        if ($this->config['mimic_source_dir']) {
            // Get the dir from the source file
            $mimic_dir = $this->config['cache_dir'] . pathinfo($this->source_file, PATHINFO_DIRNAME);
            
            // Try to create if it does not exist
            if (! file_exists($mimic_dir)) {
                try {
                    mkdir($mimic_dir, 0755, TRUE);
                } catch (Exception $e) {
                    throw $e;
                }
            }
            
            // Set the cache dir, with trailling slash
            $this->cache_dir = $mimic_dir . '/';
        }
    }
814732
def user_cache_dir(self):
        """"""
        directory = appdirs.user_cache_dir(self.appname, self.appauthor,
                              version=self.version)
        if self.create:
            self._ensure_directory_exists(directory)
        return directory
346061
def create_directories(self, create_project_dir=True):
        
        return task.create_directories(self.datadir, self.sitedir,
            self.target if create_project_dir else None)
434785
def create(self):
        """"""
        if not self._sync and not hasattr(self, '_buffer'):
            self._buffer = {}
        if not os.path.exists(self.cache_dir):
            os.makedirs(self.cache_dir)
740872
function createDirectory(directory) {
  if (!directory) {
    throw new Error('A directory must be passed to be created.');
  }
  const statObject = getStatObject(directory);
  if (statObject && statObject.isFile()) {
    throw new Error(`The directory to create '${directory}' is a file.`);
  }
  fse.ensureDirSync(directory);
}
684249
def create(config):
    
    if exists(config):
        logger.debug("Wily cache exists, skipping")
        return config.cache_path
    logger.debug(f"Creating wily cache {config.cache_path}")
    pathlib.Path(config.cache_path).mkdir(parents=True, exist_ok=True)
    create_index(config)
    return config.cache_path
1104766
def _create_cache_filename(self, source_file):
        
        res = self._create_cache_key(source_file) + ".cache"
        return os.path.join(self.__dir, res)
773393
def cache_resource(dest_dir=@local_cache_dir, options={})
      unless dest_dir
        raise ArgumentError, "Must specify destination directory when creating resource", caller
      end
      self.local_cache_dir=dest_dir
      @size = update_cache(@url, @local_path, options)
      if options[:include_pack_gz]
        @relative_local_path_pack_gz = "#{@relative_local_path}.pack.gz"
        @local_path_pack_gz = "#{dest_dir}/#{@relative_local_path_pack_gz}"
        @size_pack_gz = update_cache(@url_pack_gz, @local_path_pack_gz, options)
      end
      @signature_verified ? @size : @signature_verified
    end
872445
def _files_in_layers(self, layers, directory):
        
        files = {}

        for layer in layers:
            self.log.debug("Generating list of files in layer '%s'..." % layer)
            tar_file = os.path.join(directory, layer, "layer.tar")
            with tarfile.open(tar_file, 'r', format=tarfile.PAX_FORMAT) as tar:
                files[layer] = [self._normalize_path(
                    x) for x in tar.getnames()]
            self.log.debug("Done, found %s files" % len(files[layer]))

        return files
612747
def layers_path(self):
        
        if self._layers_path is None:
            self._layers_path = os.path.join(self.tmpdir, "layers")
        return self._layers_path