Create tcex.d directory and sub directories.
495982
def _create_tcex_dirs():
        """"""

        dirs = ['tcex.d', 'tcex.d/data', 'tcex.d/profiles']
        for d in dirs:
            if not os.path.isdir(d):
                os.makedirs(d)
1336684
def make_subdirs(self):
        """"""
        # Pull off everything below the root.
        subpath = self.full_path[len(self.context.root):]
        log.debug("make_subdirs: subpath is %s", subpath)
        # Split on directory separators, but drop the last one, as it should
        # be the filename.
        dirs = subpath.split(os.sep)[:-1]
        log.debug("dirs is %s", dirs)
        current = self.context.root
        for dir in dirs:
            if dir:
                current = os.path.join(current, dir)
                if os.path.isdir(current):
                    log.debug("%s is already an existing directory", current)
                else:
                    os.mkdir(current, 0o700)
1097332
def mkdir(path, recursive=True, **kwargs):
    """"""
    import os
    if recursive:
        os.makedirs(path, **kwargs)
    else:
        os.mkdir(path, **kwargs)
1232710
def createBlendedFolders():
    """"""
    # Create the templates folder
    create_folder(os.path.join(cwd, "templates"))

    # Create the templates/assets folder
    create_folder(os.path.join(cwd, "templates", "assets"))

    # Create the templates/assets/css folder
    create_folder(os.path.join(cwd, "templates", "assets", "css"))

    # Create the templates/assets/js folder
    create_folder(os.path.join(cwd, "templates", "assets", "js"))

    # Create the templates/assets/img folder
    create_folder(os.path.join(cwd, "templates", "assets", "img"))

    # Create the content folder
    create_folder(os.path.join(cwd, "content"))
133376
def create_required_directories(self):
        """"""
        required = (self.CACHE_DIR,
                    self.LOG_DIR,
                    self.OUTPUT_DIR,
                    self.ENGINEER.JINJA_CACHE_DIR,)

        for folder in required:
            ensure_exists(folder, assume_dirs=True)
1132171
def make_dir(cls, directory_name):
        """"""
        if not os.path.exists(directory_name):
            os.makedirs(directory_name)
334545
def create_dset(directory,slice_order='alt+z',sort_order='zt',force_slices=None):
    ''''''
    return _create_dset_dicom(directory,slice_order,sort_order,force_slices=force_slices)
137354
def _setup_directories(self):
        
        dirs = [self._data_dir]
        dirs += [os.path.join(self._data_dir, name) for name
                 in self.DATA_SUBDIRS]

        for path in dirs:
            if not os.path.isdir(path):
                try:
                    os.makedirs(path)  # recursive mkdir
                    os.chmod(path, 0755)  # rwxr-xr-x

                except OSError:
                    raise errors.DirectorySetupFail()

        return True
370191
def gen_sub_directories
        super
        File.makedirs(MODULE_DIR)
        File.makedirs(NODE_DIR)
        File.makedirs(PLUGIN_DIR)
    rescue
        $stderr.puts $ERROR_INFO.message
        exit 1
    end
361395
def _from_directory(self, dirname, prefix=""):
        
        ps = [os.path.join(here, dirname, p) for p in os.listdir(os.path.join(here, dirname))]
        n = prefix + wt_kit.string2identifier(os.path.basename(dirname))
        setattr(self, n, ps)
1130867
def _create_training_directories():
    
    logger.info('Creating a new training folder under %s .' % base_dir)

    os.makedirs(model_dir)
    os.makedirs(input_config_dir)
    os.makedirs(output_data_dir)

    _write_json({}, hyperparameters_file_dir)
    _write_json({}, input_data_config_file_dir)

    host_name = socket.gethostname()

    resources_dict = {
        "current_host": host_name,
        "hosts": [host_name]
    }
    _write_json(resources_dict, resource_config_file_dir)
357659
def setup_directories(base_dir, subdirs):
  """"""
  base_dir = os.path.expanduser(base_dir)
  tf.gfile.MakeDirs(base_dir)

  all_dirs = {}
  for subdir in subdirs:
    if isinstance(subdir, six.string_types):
      subdir_tuple = (subdir,)
    else:
      subdir_tuple = subdir
    dir_name = os.path.join(base_dir, *subdir_tuple)
    tf.gfile.MakeDirs(dir_name)
    all_dirs[subdir] = dir_name
  return all_dirs
1320605
def create_package_file(root, master_package, subroot, py_files, opts, subs):
    """"""
    text = format_heading(1, '%s' % makename(master_package, subroot))

    if opts.modulefirst:
        text += format_directive(subroot, master_package)
        text += '\n'

    # build a list of directories that are szvpackages (contain an INITPY file)
    subs = [sub for sub in subs if path.isfile(path.join(root, sub, INITPY))]
    # if there are some package directories, add a TOC for theses subpackages
    if subs:
        # text += format_heading(2, 'Subpackages')
        text += '.. toctree::\n\n'
        for sub in subs:
            text += '    %s.%s\n' % (makename(master_package, subroot), sub)
        text += '\n'

    submods = [path.splitext(sub)[0] for sub in py_files
               if not shall_skip(path.join(root, sub), opts) and
               sub != INITPY]
    if submods:
        #text += format_heading(2, 'Submodules')
        if opts.separatemodules:
            text += '.. toctree::\n\n'
            for submod in submods:
                modfile = makename(master_package, makename(subroot, submod))
                text += '   %s\n' % modfile

                # generate separate file for this module
                if not opts.noheadings:
                    filetext = format_heading(1, '%s module' % modfile)
                else:
                    filetext = ''
                filetext += format_directive(makename(subroot, submod),
                                             master_package)
                write_file(modfile, filetext, opts)
        else:
            for submod in submods:
                modfile = makename(master_package, makename(subroot, submod))
                if not opts.noheadings:
                    text += format_heading(2, '%s module' % modfile)
                text += format_directive(makename(subroot, submod),
                                         master_package)
                text += '\n'
        text += '\n'

    if not opts.modulefirst:
        text += format_heading(2, 'Module contents')
        text += format_directive(subroot, master_package)

    write_file(makename(master_package, subroot), text, opts)
319568
def _mkdirs(d):
    
    try:
        os.makedirs(d)
    except OSError as e:
        if e.errno != errno.EEXIST:
            raise
504789
def makedirs(name):
    """"""

    import os, errno

    try:
        os.makedirs(name)
    except OSError as ex:
        if ex.errno == errno.EEXIST and os.path.isdir(name):
            # ignore existing directory
            pass
        else:
            # a different error happened
            raise
285911
def _generate_tar(dir_path):
    """"""
    try:
        with tarfile.open(dir_path + '.tar', 'w') as tar:
            tar.add(dir_path)
    except tarfile.TarError as e:
        stderr("Error: tar archive creation failed [" + str(e) + "]", exit=1)
334819
def create_all_parent_directories(ase, dirs_created, timeout=None):
    # type: (blobxfer.models.azure.StorageEntity, dict, int) -> None
    
    dirs = pathlib.Path(ase.name).parts
    if len(dirs) <= 1:
        return
    # remove last part (which is the file)
    dirs = dirs[:-1]
    dk = ase.client.account_name + ':' + ase.container
    for i in range(0, len(dirs)):
        dir = str(pathlib.Path(*(dirs[0:i + 1])))
        if dk not in dirs_created or dir not in dirs_created[dk]:
            ase.client.create_directory(
                share_name=ase.container,
                directory_name=dir,
                fail_on_exist=False,
                timeout=timeout)
            if dk not in dirs_created:
                dirs_created[dk] = set()
            dirs_created[dk].add(dir)