Generate the folders.
333717
public function generateFolders()
    {
        foreach ($this->getFolders() as $folder) {
            $path = $this->component->getComponentPath($this->getName()) . '/' . $folder;

            $this->filesystem->makeDirectory($path, 0755, true);

            $this->generateGitKeep($path);
        }
    }
94866
def prep_folder(self, seq):
        """"""
        itasser_dir = op.join(self.root_dir, self.id)

        if not op.exists(itasser_dir):
            os.makedirs(itasser_dir)

        tmp = {self.id: seq}

        fasta.write_fasta_file_from_dict(indict=tmp,
                                         outname='seq',
                                         outext='.fasta',
                                         outdir=itasser_dir)
        return itasser_dir
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)
66160
def _generator_file(self):
        """'"""
        for path in self.paths:
            if os.path.isfile(path):
                if isvalid(path, self.access, self.extensions,
                           minsize=self.minsize):
                    yield os.path.abspath(path)
            elif os.path.isdir(path):
                for root, _, fnames in self._walker(path):
                    yield from self._generator_rebase(fnames, root)
1132171
def make_dir(cls, directory_name):
        """"""
        if not os.path.exists(directory_name):
            os.makedirs(directory_name)
1274639
def _generate_output_dir(settings, path):
        

        relpath = os.path.relpath(settings.root,path)
        count = relpath.count(os.sep) + 1

        return relpath+os.path.sep, count
701545
protected function generateFolders()
    {
        if (!$this->finder->isDirectory($this->pluggable->getPath())) {
            $this->finder->makeDirectory($this->pluggable->getPath());
        }

        $this->finder->makeDirectory($this->getPluggablePath($this->slug, true));

        foreach ($this->folders as $folder) {
            $this->finder->makeDirectory($this->getPluggablePath($this->slug).$folder);
        }
    }
721433
def setdirs(outfiles):
    """"""
    for k in outfiles:
        fname=outfiles[k]
        dname= os.path.dirname(fname)
        if not os.path.isdir(dname):
            os.mkdir(dname)
283745
protected function _generateFiles() {
        foreach ($this->selectedArtifacts as $artifact) {
            $settings = $artifact->getGeneratorSettings(static::getKey());

            foreach ($this->getFileOrDirectorySettings($settings, "files") as $file)
                $this->_processFileSpecification(
                    $artifact, fphp\Specification\FileSpecification::fromArrayAndSettings($file, $settings));

            foreach ($this->getFileOrDirectorySettings($settings, "directories") as $directory) {
                $directorySpecification = fphp\Specification\DirectorySpecification::fromArrayAndSettings($directory, $settings);
                
                foreach ($directorySpecification->getFileSpecifications() as $fileSpecification)
                    $this->_processFileSpecification($artifact, $fileSpecification);
            }
        }
    }
1333245
def make_directories(self):
        

        # get the directories from the template
        directories = []
        try:
            directories = self.directories()
        except AttributeError:
            self.term.print_info(u"No directory in the template.")

        working_dir = os.getcwd()
        # iteratively create the directories
        for directory in directories:
            dir_name = working_dir + '/' + directory
            if not os.path.isdir(dir_name):
                try:
                    os.makedirs(dir_name)
                except OSError as error:
                    if error.errno != errno.EEXIST:
                        raise
            else:
                self.term.print_error_and_exit(u"The directory {0} already exists."
                         .format(directory))

            self.term.print_info(u"Creating directory '{0}'"
                                 .format(self.term.text_in_color(directory, TERM_GREEN)))
1061114
protected function createFolders()
    {
        $dir    = null;
        $target = $this->getTargetDirectory();

        /** @noinspection IsEmptyFunctionUsageInspection */
        if (!empty($target)) {
            $dir = rtrim($target, '/') . DIRECTORY_SEPARATOR;
            $this->setTarget($dir);
        }

        if ($dir !== null && !is_dir($dir) && $this->isAllowCreateFolders()) {
            /** @noinspection NotOptimalIfConditionsInspection */
            /** @noinspection PhpUsageOfSilenceOperatorInspection */
            if (!@mkdir($dir, 0777, true) && !is_dir($dir)) {
                throw new Exception\NoSuchDirectoryException(
                    sprintf('Directory %s does not exists.', $dir)
                );
            }
        }
    }
1165293
protected function createFolders()
    {
        foreach ($this->getFolderStructure() as $folder) {
            $newFolder = $this->twigStringRenderer->renderToString($folder, $this->data);
            $this->fs->mkdir($this->targetPath.DIRECTORY_SEPARATOR.$newFolder, self::DIRECTORY_MODE);

            $msg = '[mkdir] '.$this->targetPath.DIRECTORY_SEPARATOR.$newFolder;
            if ($this->reportingEnabled) {
                $this->report[] =$msg;
            }
        }
    }
394100
private function generate()
	{
		// only load sections if we dont have a cache
		$this->discoverComponentSections();

		// generate output by processing sections
		$this->output['sections'] = $this->processComponentSections($this->sections);

		// remove duplicate available versions & order
		$this->output['versions']['available'] = array_unique($this->output['versions']['available']);

		// get the highest version available
		$this->output['versions']['max'] = end($this->output['versions']['available']);

		// create cache folder
		$cacheFile = PATH_APP . DS . 'cache' . DS . 'api' . DS . 'documentation.json';

		if (App::has('filesystem') && !App::get('filesystem')->exists(dirname($cacheFile)))
		{
			App::get('filesystem')->makeDirectory(dirname($cacheFile));
		}

		// save cache file
		file_put_contents($cacheFile, json_encode($this->output));
	}
843880
protected function generatePath()
    {
        $filesystem = new Filesystem();
        $path = $this->cacheFolder;
        $path = trim($path, '/');

        if (!empty($this->namespace)) {
            $path .= '/'.$this->namespace;
        }

        if (!$filesystem->exists($this->projectDir.'/'.$path)) {
            $filesystem->mkdir($this->projectDir.'/'.$path);
        }
        $this->cacheFolderWithNamespace = $path;
    }
886174
protected function generateTar()
	{
		$this->content		= "";																	// Clear any data currently in $this->content	
		if( $this->numFolders > 0 )
		{																							// Generate Records for each folder, if we have directories
			foreach( $this->folders as $key => $information )
			{
				unset( $header );
				// Generate tar header for this folder
				// Filename, Permissions, UID, GID, size, Time, checksum, typeflag, linkname, magic, version, user name, group name, devmajor, devminor, prefix, end
				$header	= '';
				$header .= str_pad($information['name'],100,chr(0));
				$header .= str_pad(decoct($information['mode']),7,'0',STR_PAD_LEFT) . chr(0);
				$header .= str_pad(decoct($information['user_id']),7,'0',STR_PAD_LEFT) . chr(0);
				$header .= str_pad(decoct($information['group_id']),7,'0',STR_PAD_LEFT) . chr(0);
				$header .= str_pad(decoct(0),11,'0',STR_PAD_LEFT) . chr(0);
				$header .= str_pad(decoct($information['time']),11,'0',STR_PAD_LEFT) . chr(0);
				$header .= str_repeat(' ',8);
				$header .= '5';
				$header .= str_repeat(chr(0),100);
				$header .= str_pad('ustar',6,chr(32));
				$header .= chr(32) . chr(0);
				$header .= str_pad('',32,chr(0));
				$header .= str_pad('',32,chr(0));
				$header .= str_repeat(chr(0),8);
				$header .= str_repeat(chr(0),8);
				$header .= str_repeat(chr(0),155);
				$header .= str_repeat(chr(0),12);
				$checksum = str_pad(decoct($this->computeUnsignedChecksum($header)),6,'0',STR_PAD_LEFT);	// Compute header checksum
				for($i=0; $i<6; $i++)
					$header[(148 + $i)] = substr($checksum,$i,1);
				$header[154] = chr(0);
				$header[155] = chr(32);
				$this->content .= $header;																	// Add new tar formatted data to tar file contents
			}
		}
		if( $this->numFiles > 0 )																				// Generate Records for each file, if we have files( We should...)
		{
			foreach( $this->files as $key => $information )
			{
				unset($header);
				// Generate the TAR header for this file
				// Filename, Permissions, UID, GID, size, Time, checksum, typeflag, linkname, magic, version, user name, group name, devmajor, devminor, prefix, end
				$header	= '';
				$header .= str_pad($information['name'],100,chr(0));
				$header .= str_pad(decoct($information['mode']),7,'0',STR_PAD_LEFT) . chr(0);
				$header .= str_pad(decoct($information['user_id']),7,'0',STR_PAD_LEFT) . chr(0);
				$header .= str_pad(decoct($information['group_id']),7,'0',STR_PAD_LEFT) . chr(0);
				$header .= str_pad(decoct($information['size']),11,'0',STR_PAD_LEFT) . chr(0);
				$header .= str_pad(decoct($information['time']),11,'0',STR_PAD_LEFT) . chr(0);
				$header .= str_repeat(' ',8);
				$header .= '0';
				$header .= str_repeat(chr(0),100);
				$header .= str_pad('ustar',6,chr(32));
				$header .= chr(32) . chr(0);
				$header .= str_pad($information['user_name'],32,chr(0));									// How do I get a file's user name from PHP?
				$header .= str_pad($information['group_name'],32,chr(0));									// How do I get a file's group name from PHP?
				$header .= str_repeat(chr(0),8);
				$header .= str_repeat(chr(0),8);
				$header .= str_repeat(chr(0),155);
				$header .= str_repeat(chr(0),12);
				$checksum = str_pad(decoct($this->computeUnsignedChecksum($header)),6,'0',STR_PAD_LEFT);	// Compute header checksum
				for($i=0; $i<6; $i++)
					$header[(148 + $i)] = substr($checksum,$i,1);
				$header[154] = chr(0);
				$header[155] = chr(32);
				$filecontents = str_pad($information['file'],(ceil($information['size'] / 512) * 512),chr(0));			// Pad file contents to byte count divisible by 512
				$this->content .= $header . $filecontents;													// Add new tar formatted data to tar file contents
			}
		}
		$this->content .= str_repeat(chr(0),512);															// Add 512 bytes of NULLs to designate EOF
		return true;
	}
652564
def create_dirs(self):
        
        if not os.path.isdir(self._path):
            os.makedirs(self._path)
        for dir_name in [self.OBJ_DIR, self.TMP_OBJ_DIR, self.PKG_DIR, self.CACHE_DIR]:
            path = os.path.join(self._path, dir_name)
            if not os.path.isdir(path):
                os.mkdir(path)
        if not os.path.exists(self._version_path()):
            self._write_format_version()
1292444
public function createDefaultFolders()
    {
        foreach ($this->config()->default_folders as $class) {
            
            if (!self::find($class)) {
                
                $folder = Injector::inst()->create($class);
                
                $folder->Sort = 0;
                
                $folder->write();
                $folder->copyVersionToStage(Versioned::DRAFT, Versioned::LIVE);
                $folder->flushCache();
                
                DB::alteration_message(sprintf('Creating %s.%s', $class, $folder->Title), 'created');
                
            }
            
        }
    }