Makes all folders declared in the config if they
        do not exist.
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)
1109939
def ensure_dir(filename):
    """"""
    directory = os.path.dirname(filename)
    if directory and not os.path.isdir(directory):
        os.makedirs(directory)
848218
def mk_dir(self) :
        """"""
        if not os.path.exists(self.abs) :
            os.makedirs(self.abs)
556867
public static function ensureDefines()
    {
        if (defined('DIR_CORE')) {
            return;
        }
        
        // Define directory basenames
        define("DIR_PUBLIC_BASENAME", "public/");
        define("DIR_LIBS_BASENAME", "libs/");
        define("DIR_ADDONS_BASENAME", "addons/");
        define("DIR_DATA_BASENAME", "data/");
        define("DIR_CONTENT_BASENAME", "content/");
        define("DIR_CONFIG_BASENAME", "config/");
        define("DIR_TEMPLATES_BASENAME", "templates/");
        define("DIR_LOCALE_BASENAME", "locale/");
        
        // Define directories
        define(Xentriq::CONST_DIR_ASSUMED_ROOT, dirname(DIR_PUBLIC) . '/', false);
        
        define(Xentriq::CONST_DIR_CORE, dirname(__FILE__) . '/', false);
        define(Xentriq::CONST_DIR_LIBS, str_replace(DIR_PUBLIC_BASENAME, DIR_LIBS_BASENAME, DIR_PUBLIC) . '/');
        define(Xentriq::CONST_DIR_ADDONS, str_replace(DIR_PUBLIC_BASENAME, DIR_ADDONS_BASENAME, DIR_PUBLIC) . '/', false);
        define("DIR_DATA", str_replace(DIR_PUBLIC_BASENAME, DIR_DATA_BASENAME, DIR_PUBLIC) . '/', false);
        define("DIR_CONTENT", str_replace(DIR_PUBLIC_BASENAME, DIR_CONTENT_BASENAME, DIR_PUBLIC) . '/', false);
        define("DIR_CONFIG", str_replace(DIR_PUBLIC_BASENAME, DIR_CONFIG_BASENAME, DIR_PUBLIC) . '/', false);
        
        define("DIR_TEMPLATES", DIR_CONTENT . DIR_TEMPLATES_BASENAME);
        
        define("DIR_LOCALE", DIR_CORE . DIR_LOCALE_BASENAME);
        define("DIR_LOCALE_PROJECT", DIR_CONTENT . DIR_LOCALE_BASENAME);
        
        // Define extensions
        define("EXT_PAGE", ".xpage");
        define("EXT_PART", ".xpart");
        define("TEMPLATE_INDEX", 'index.xpage');
        
        define("EXT_CSS", ".css");
        define("EXT_SCSS", ".scss");
        define("EXT_SASS", ".sass");
        define("EXT_JS", ".js");
        define("EXT_PHP", ".php");
        define("EXT_XML", ".xml");
        define("EXT_JSON", ".json");
        define("EXT_AUTH", ".auth");
        
        // Define characters
        define("CHAR_SPACE", ' ');
        define("CHAR_CRLF", "\r\n");
        define("CHAR_SLASH", '/');
        define("CHAR_BACKSLASH", '\\');
        define("CHAR_OB", '[');
        define("CHAR_CB", ']');
        define("CHAR_OCB", '(');
        define("CHAR_CCB", ')');
        define("CHAR_OSB", '{');
        define("CHAR_CSB", '}');
        define("CHAR_SEMICOLON", ';');
        define("CHAR_QUOTE", '\'');
        define("CHAR_DOUBLE_QUOTE", '"');
        define("CHAR_BACKTICK", '`');
        
        define("GZIP_SUPPORTED", (substr_count(ArrayUtils::getArrayValueForKeyOrDefault($_SERVER, 'HTTP_ACCEPT_ENCODING', ''), 'gzip') > 0));
        
        // Define environment, defaults to `default`
        define("XENTRIQ_ENVIRONMENT", Utils::getEnvironmentVariable("XENTRIQ_ENVIRONMENT", "default"));
        
        // Define base DEBUG value to ensure proper output.
        define(Xentriq::CONST_DEBUG, Utils::getEnvironmentVariable(Xentriq::CONST_DEBUG, false), true);
        
        // Try to load configuration values from JSON configuration
        define(Xentriq::CONST_DEBUG, Config::getConfigurationValue('debug'));
        
        define("INDEX_FILE", 'index.php');
        define("USE_INDEX_FILE", Config::getConfigurationValueOrDefault('useIndexPhp', false));
        
        define("DISABLE_GZIP", Config::getConfigurationValueOrDefault('disableGzip', false));
        
        define("DISABLE_DEFAULT_RESPONSE_HEADERS", Config::getConfigurationValueOrDefault('disableDefaultResponseHeaders', false));
        
        define("URL_SITE", Request::getSiteUrl());
    }
265082
def remove_unused_directories(src_folder, categories):
  
  files = os.listdir(src_folder)
  os.mkdir("unused")
  for name in files:
    full_path = os.path.join(src_folder, name)
    if os.path.isdir(full_path):
      if not( name in categories or name == "_background_noise_"):
        newPath = os.path.join("unused", name)
        print("moving: ", full_path, "-->", newPath)
        shutil.move(full_path, newPath)
530762
function mkdirpSync(folder) {
  if (!fs.existsSync(path.dirname(folder))) {
    mkdirpSync(path.dirname(folder));
  }

  if (!fs.existsSync(folder)) {
    fs.mkdirSync(folder, '0755');
  }
}
108858
def ensure_config
      return if @config_found
      found = CONFIG_FILES.all? {|f| File.exists? "#{@options[:config_path]}/#{f}" }
      found ? @config_dir = true : config_not_found
    end
1064959
def _ensure_directory_exists(self, directory):
        """"""
        if not os.path.lexists(directory):
            os.makedirs(directory)
        return directory
1332797
def _ensure_dir_exists(path):
    """"""
    if not op.exists(path):
        os.makedirs(path)
    assert op.exists(path) and op.isdir(path)
1093939
def cache_makedirs(self, subdir=None):
        '''
        
        '''
        if subdir is not None:
            dirname = self.cache_path
            if subdir:
                dirname = os.path.join(dirname, subdir)
        else:
            dirname = os.path.dirname(self.cache_path)
        os.makedirs(dirname, exist_ok=True)
23943
public void checkFolders(Set<String> folders) {

        if (folders != null) {
            for (String folder : folders) {
                CmsLazyTreeItem item = m_itemsByPath.get(folder);
                if ((item != null) && (item.getCheckBox() != null)) {
                    item.getCheckBox().setChecked(true);
                }
            }
        }

    }
516410
def create_folder_if_not_exists(folder_path):
    """"""
    folder_path = tilde_expansion(folder_path)
    folder_path = "".join([folder_path, '/']) if not folder_path[-1] == '/' else folder_path
    direc = os.path.dirname(folder_path)
    if not folder_exists(direc):
        os.makedirs(direc)
1043477
def do_folder_create(client, args):
    """"""
    for folder_uri in args.uris:
        client.create_folder(folder_uri, recursive=True)
    return True
505945
def ensure_dirs(filename):
    """"""
    dirname, _ = os.path.split(filename)
    if dirname and not os.path.exists(dirname):
        os.makedirs(dirname)
1245157
def ensure_dir(self, mode=0777):
        
        if not self.exists() or not self.isdir():
            os.makedirs(self, mode)
584724
private void cleanup() {

        m_folder1Exclusive = null;
        m_folder2Exclusive = null;
        m_foldersSibling = null;
        m_foldersEqualnames = null;
        m_foldersDifferenttypes = null;
    }
205173
def makedirs(path, mode=0o777, exist_ok=False):
    """"""
    os.makedirs(path, mode, exist_ok)