Make folders where we would like to put results etc.
763301
def paginate(self):
        """"""

        project_dir = self.project_dir
        raw_dir = self.raw_dir
        batch_dir = self.batch_dir

        if project_dir is None:
            raise UnderDefined("no project directory defined")
        if raw_dir is None:
            raise UnderDefined("no raw directory defined")
        if batch_dir is None:
            raise UnderDefined("no batcb directory defined")

        # create the folders
        if not os.path.isdir(project_dir):
            os.mkdir(project_dir)
            logging.info(f"created folder {project_dir}")
        if not os.path.isdir(batch_dir):
            os.mkdir(batch_dir)
            logging.info(f"created folder {batch_dir}")
        if not os.path.isdir(raw_dir):
            os.mkdir(raw_dir)
            logging.info(f"created folder {raw_dir}")

        return project_dir, batch_dir, raw_dir
1078958
private function createFolders() {
        foreach ($this->oMetadata->getSchemas() as $valueSchema) {
            if (!is_dir($this->ormFolder . $valueSchema)) {
                $this->fileFolder->mkdir($this->ormFolder . $this->toCamelCase($valueSchema) . DS . 'Entities');
                $this->fileFolder->mkdir($this->ormFolder . $this->toCamelCase($valueSchema) . DS . 'Tables');
            }
        }
        return $this;
    }
126708
public function maybeCreateExportFolders()
    {
        if (!is_writable($this->exportFolder)) {
            trigger_error('The export folder (' . $this->exportFolder .') is not writable. Exports will not be saved.', E_USER_ERROR);
        }

        if (!file_exists($this->exportFolder . 'json')) {
            mkdir($this->exportFolder . 'json');
            chmod($this->exportFolder . 'json', 0777);
        }

        if (!file_exists($this->exportFolder . 'php')) {
            mkdir($this->exportFolder . 'php');
            chmod($this->exportFolder . 'php', 0777);
        }
    }
1105976
def initialize_directories(self):
        """"""
        makedirs(self.config.source_index)
        makedirs(self.config.eggs_cache)
822432
function makeDirs(dirs) {
	_.castArray(dirs).forEach(dir => {
		if (fs.existsSync(dir)) {
			return;
		}

		log.added(`Create folder ${dir}`);
		fs.ensureDirSync(dir);
	});
}
1291280
function createResultFolder(folderName) {
        var folder = path.join(resultsDir, folderName);

        debug('Creating the folder %s', folderName);

        return createGlobalFolder().then(function() {
            return Q.nfcall(fs.mkdir, folder);
        });
    }
111692
def add_file(self, f):
        """"""

        if not self.files:
            self.files = set()

        self.files.add(f)

        self.locations.set(f.type_)
205173
def makedirs(path, mode=0o777, exist_ok=False):
    """"""
    os.makedirs(path, mode, exist_ok)
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;
            }
        }
    }
677250
function makeDirectories(dirs, callback) {
  var mkdir = function(dir, mkCallback) {
    exec('mkdir -p ' + dir, function(err, stdout, stderr) {
      return mkCallback(err);
    });
  };

  async.forEach(dirs, mkdir, callback);
}
1092172
def makedirs(path):
    """"""
    path = Path(path)

    if not path.exists():
        path.mkdir(parents=True)
1228694
protected function createDirectories()
    {
        if (! is_dir(resource_path('views/layouts'))) {
            mkdir(resource_path('views/layouts'), 0755, true);
        }

        if (! is_dir(resource_path('views/auth/passwords'))) {
            mkdir(resource_path('views/auth/passwords'), 0755, true);
        }
    }
1270801
def make_folder_for_today(log_dir):
    """"""
    now = datetime.datetime.now()
    sub_folders_list = ['{0:04d}'.format(now.year),
                        '{0:02d}'.format(now.month),
                        '{0:02d}'.format(now.day)]
    folder = log_dir
    for sf in sub_folders_list:
        folder = os.path.join(folder, sf)
        if not os.path.exists(folder):
            os.makedirs(folder)
    return folder
848218
def mk_dir(self) :
        """"""
        if not os.path.exists(self.abs) :
            os.makedirs(self.abs)
1324910
def _save(self) -> None:
        """"""
        self._log.info("Saving results to '%s'" % self.folder)
        path: str = self.folder + "/"
        for job in self.results:
            if job['domain'] in self.saved:
                continue
            job['start_time'] = str_datetime(job['start_time'])
            job['end_time'] = str_datetime(job['end_time'])
            jid: int = random.randint(100000, 999999)
            filename: str = "%s_%s_%d_job.json" % (self.project, job['domain'], jid)
            handle = open(path + filename, 'w')
            handle.write(json.dumps(job, indent=4))
            handle.close()

            filename = "%s_%s_%d_emails.txt" % (self.project, job['domain'], jid)
            handle = open(path + filename, 'w')
            for email in job['results']['emails']:
                handle.write(email + "\n")
            handle.close()
            self.saved.append(job['domain'])
434300
def make_required_folders(self):
        
        for folder in [
            self.pending_folder,
            self.usb_incoming_folder,
            self.outgoing_folder,
            self.incoming_folder,
            self.archive_folder,
            self.tmp_folder,
            self.log_folder,
        ]:
            if not os.path.exists(folder):
                os.makedirs(folder)
439354
public final void addFolder(@NotNull final Folder folder) {
        Contract.requireArgNotNull("folder", folder);
        if (folders == null) {
            folders = new ArrayList<>();
        }
        folders.add(folder);
    }