Return list of HTML theme paths.
764745
def get_html_theme_path():
    """"""
    theme_path = os.path.abspath(os.path.dirname(__file__))
    return [theme_path]
888414
public function paths( $path = null )
	{
		$paths = [
			'dir.stylesheet' => get_stylesheet_directory(),
			'dir.template'   => get_template_directory(),
			'dir.upload'     => wp_upload_dir()['basedir'],
			'uri.stylesheet' => get_stylesheet_directory_uri(),
			'uri.template'   => get_template_directory_uri(),
		];

		if( is_null( $path )) {
			return $paths;
		}

		return array_key_exists( $path, $paths )
			? trailingslashit( $paths[$path] )
			: '';
	}
441741
def get_paths(self, theme, icon_size):
        """"""

        _size_str = "x".join(map(str, icon_size))

        theme_path = get_program_path() + "share" + os.sep + "icons" + os.sep
        icon_path = theme_path + theme + os.sep + _size_str + os.sep
        action_path = icon_path + "actions" + os.sep
        toggle_path = icon_path + "toggles" + os.sep

        return theme_path, icon_path, action_path, toggle_path
755330
def get_paths(patterns, start_dirs=None, max_depth=1):
    """"""
    # Shortcut: if there is only one pattern, make sure we process just that.
    if len(patterns) == 1 and not start_dirs:
        pattern = patterns[0]
        directory = os.path.dirname(pattern)
        if directory:
            patterns = [os.path.basename(pattern)]
            start_dirs = directory
            max_depth = 1

    if not start_dirs or start_dirs == '.':
        start_dirs = os.getcwd()
    for start_dir in start_dirs.split(','):
        for root, dirs, files in os.walk(start_dir):  # pylint: disable=W0612
            if max_depth is not None:
                relpath = os.path.relpath(root, start=start_dir)
                depth = len(relpath.split(os.sep))
                if depth > max_depth:
                    continue
            names = []
            for pattern in patterns:
                names += fnmatch.filter(files, pattern)
            for name in names:
                path = os.path.join(root, name)
                yield path
883206
def get_font_path(self):
        """"""
        r = request.GetFontPath(display = self.display)
        return r.paths
1026923
def _get_template_dirs():
    """"""
    return filter(lambda x: os.path.exists(x), [
        # user dir
        os.path.join(os.path.expanduser('~'), '.py2pack', 'templates'),
        # system wide dir
        os.path.join('/', 'usr', 'share', 'py2pack', 'templates'),
        # usually inside the site-packages dir
        os.path.join(os.path.dirname(os.path.abspath(__file__)), 'templates'),
    ])
722614
protected function get_paths() {
		return [
			WP_LANG_DIR . '/' . $this->textdomain . '-' . get_locale() . '.mo',
			dirname( KIRKI_PLUGIN_FILE ) . '/languages/' . $this->textdomain . '-' . get_locale() . '.mo',
		];
	}
929131
def _items_to_rela_paths(self, items):
        """"""
        paths = []
        for item in items:
            if isinstance(item, (BaseIndexEntry, (Blob, Submodule))):
                paths.append(self._to_relative_path(item.path))
            elif isinstance(item, string_types):
                paths.append(self._to_relative_path(item))
            else:
                raise TypeError("Invalid item type: %r" % item)
        # END for each item
        return paths
1008229
def list_items(path_to_directory, pattern, wanted):
    """"""
    if not path_to_directory:
        return set()
    needed = make_needed(pattern, path_to_directory, wanted)
    return [os.path.join(path_to_directory, name)
            for name in _names_in_directory(path_to_directory)
            if needed(name)]
1292212
def HTMLHelpWorkshop(self):
        
        if self.vc_ver < 11.0:
            return []

        return [os.path.join(self.si.ProgramFilesx86, 'HTML Help Workshop')]
785442
def get_urlpatterns(self):
        
        return [
            path(
                _('mark/forums/'),
                self.mark_forums_read_view.as_view(),
                name='mark_all_forums_read',
            ),
            path(
                _('mark/forums/<int:pk>/'),
                self.mark_forums_read_view.as_view(),
                name='mark_subforums_read',
            ),
            path(
                _('mark/forum/<int:pk>/topics/'),
                self.mark_topics_read_view.as_view(),
                name='mark_topics_read',
            ),
            path(
                _('unread-topics/'),
                self.unread_topics_view.as_view(),
                name='unread_topics',
            ),
        ]
211572
def _fetch_templates(src):
    '''
    
    '''
    templates = []
    log.debug('Listing contents of %s', src)
    for item in os.listdir(src):
        s = os.path.join(src, item)
        if os.path.isdir(s):
            template_path = os.path.join(s, TEMPLATE_FILE_NAME)
            if os.path.isfile(template_path):
                templates.append(_get_template(template_path, item))
            else:
                log.debug("Directory does not contain %s %s", template_path,
                          TEMPLATE_FILE_NAME)
    return templates
575698
def urls_from_file_tree(template_dir):
    """"""
    urls = []  # keep a list of of all the files/paths

    # Should be somethign like:
    # /path/to/myproject/templates/staticflatpages
    root_dir = join(template_dir, 'staticflatpages')

    for root, dirs, files in walk(template_dir):
        # Only do this for the ``staticflatpages`` directory or sub-directories
        if "staticflatpages" in root:
            root = root.replace(root_dir, '')
            for f in files:
                path = join(root, f)
                path = _format_as_url(path)
                urls.append(path)
    return urls
516806
def _list_result_paths(target_path, log_file_name='log'):
    """"""

    result_list = []

    for root, _dirs, _files in os.walk(os.path.abspath(target_path)):
        for name in _files:
            if name == log_file_name:
                result_list.append(root)

    return result_list
16371
def get_path_list(opts):
    
    paths = []
    for opt, arg in list(opts.items()):
        if opt in ('-p', '--jspath'):
            paths.append(arg)
    return paths or [os.getcwd()]
1366335
protected function getThemePaths($themes)
    {
        $dirsFromConfig = array_filter(
            [
                $this->getConfig()->get('digipolis.root.project', false),
                $this->getConfig()->get('digipolis.root.web', false),
            ]
        );
        $dirs = empty($this->dirs)
            ? $dirsFromConfig
            : $this->dirs;
        if (empty($dirs)) {
            $dirs = [getcwd()];
        }

        $finder = clone $this->finder;
        $finder->in($dirs)->files();
        foreach ($themes as $themeName) {
            // Matches 'themes/(custom/){randomfoldername}/{themename}.info.yml'.
            $finder->path('/themes\/(custom\/)?[^\/]*\/' . preg_quote($themeName, '/') . '\.info\.yml/');
        }
        $processed = [];
        $paths = [];
        foreach ($finder as $infoFile) {
            $path = dirname($infoFile->getRealPath());
            // The web dir can be a subdir of the project root (in most cases
            // really). Make sure we don't compile the same theme twice.
            if (isset($processed[$path])) {
                continue;
            }
            $processed[$path] = true;
            $theme = $infoFile->getBasename('.info.yml');
            $paths[$theme] = $path;
        }
        return $paths;
    }
856441
public static function getAvailableThemes() {
		$path = \ROOT . \DS . 'views' . \DS . self::THEMES_FOLDER . \DS . '*';
		$dirs = \glob ( $path, GLOB_ONLYDIR | GLOB_NOSORT );
		$result = [ ];
		foreach ( $dirs as $dir ) {
			$result [] = basename ( $dir );
		}
		return $result;
	}