PNG  IHDR* pHYs+ IDATx]n#; cdLb Ǚ[at¤_:uP}>!Usă cag޿ ֵNu`ݼTâabO7uL&y^wFٝA"l[|ŲHLN밪4*sG3|Dv}?+y߉{OuOAt4Jj.u]Gz*҉sP'VQKbA1u\`& Af;HWj hsO;ogTu uj7S3/QzUr&wS`M$X_L7r2;aE+ώ%vikDA:dR+%KzƉo>eOth$z%: :{WwaQ:wz%4foɹE[9<]#ERINƻv溂E%P1i01 |Jvҗ&{b?9g=^wζXn/lK::90KwrюO\!ջ3uzuGv^;騢wq<Iatv09:tt~hEG`v;3@MNZD.1]L:{ծI3`L(÷ba")Y.iljCɄae#I"1 `3*Bdz>j<fU40⨬%O$3cGt]j%Fߠ_twJ;ABU8vP3uEԑwQ V:h%))LfraqX-ۿX]v-\9I gl8tzX ]ecm)-cgʒ#Uw=Wlێn(0hPP/ӨtQ“&J35 $=]r1{tLuǮ*i0_;NƝ8;-vݏr8+U-kruȕYr0RnC]*ެ(M:]gE;{]tg(#ZJ9y>utRDRMdr9㪩̞zֹb<ģ&wzJM"iI( .ꮅX)Qw:9,i좜\Ԛi7&N0:asϓc];=ΗOӣ APqz93 y $)A*kVHZwBƺnWNaby>XMN*45~ղM6Nvm;A=jֲ.~1}(9`KJ/V F9[=`~[;sRuk]rєT!)iQO)Y$V ی ۤmzWz5IM Zb )ˆC`6 rRa}qNmUfDsWuˤV{ Pݝ'=Kֳbg,UҘVz2ﴻnjNgBb{? ߮tcsͻQuxVCIY۠:(V뺕 ٥2;t`@Fo{Z9`;]wMzU~%UA蛚dI vGq\r82iu +St`cR.6U/M9IENDB` REDROOM
PHP 5.6.40
Preview: glob.py Size: 5.08 KB
/lib/python3.6/site-packages/setuptools/glob.py

"""
Filename globbing utility. Mostly a copy of `glob` from Python 3.5.

Changes include:
 * `yield from` and PEP3102 `*` removed.
 * `bytes` changed to `six.binary_type`.
 * Hidden files are not ignored.
"""

import os
import re
import fnmatch
from setuptools.extern.six import binary_type

__all__ = ["glob", "iglob", "escape"]


def glob(pathname, recursive=False):
    """Return a list of paths matching a pathname pattern.

    The pattern may contain simple shell-style wildcards a la
    fnmatch. However, unlike fnmatch, filenames starting with a
    dot are special cases that are not matched by '*' and '?'
    patterns.

    If recursive is true, the pattern '**' will match any files and
    zero or more directories and subdirectories.
    """
    return list(iglob(pathname, recursive=recursive))


def iglob(pathname, recursive=False):
    """Return an iterator which yields the paths matching a pathname pattern.

    The pattern may contain simple shell-style wildcards a la
    fnmatch. However, unlike fnmatch, filenames starting with a
    dot are special cases that are not matched by '*' and '?'
    patterns.

    If recursive is true, the pattern '**' will match any files and
    zero or more directories and subdirectories.
    """
    it = _iglob(pathname, recursive)
    if recursive and _isrecursive(pathname):
        s = next(it)  # skip empty string
        assert not s
    return it


def _iglob(pathname, recursive):
    dirname, basename = os.path.split(pathname)
    if not has_magic(pathname):
        if basename:
            if os.path.lexists(pathname):
                yield pathname
        else:
            # Patterns ending with a slash should match only directories
            if os.path.isdir(dirname):
                yield pathname
        return
    if not dirname:
        if recursive and _isrecursive(basename):
            for x in glob2(dirname, basename):
                yield x
        else:
            for x in glob1(dirname, basename):
                yield x
        return
    # `os.path.split()` returns the argument itself as a dirname if it is a
    # drive or UNC path.  Prevent an infinite recursion if a drive or UNC path
    # contains magic characters (i.e. r'\\?\C:').
    if dirname != pathname and has_magic(dirname):
        dirs = _iglob(dirname, recursive)
    else:
        dirs = [dirname]
    if has_magic(basename):
        if recursive and _isrecursive(basename):
            glob_in_dir = glob2
        else:
            glob_in_dir = glob1
    else:
        glob_in_dir = glob0
    for dirname in dirs:
        for name in glob_in_dir(dirname, basename):
            yield os.path.join(dirname, name)


# These 2 helper functions non-recursively glob inside a literal directory.
# They return a list of basenames. `glob1` accepts a pattern while `glob0`
# takes a literal basename (so it only has to check for its existence).


def glob1(dirname, pattern):
    if not dirname:
        if isinstance(pattern, binary_type):
            dirname = os.curdir.encode('ASCII')
        else:
            dirname = os.curdir
    try:
        names = os.listdir(dirname)
    except OSError:
        return []
    return fnmatch.filter(names, pattern)


def glob0(dirname, basename):
    if not basename:
        # `os.path.split()` returns an empty basename for paths ending with a
        # directory separator.  'q*x/' should match only directories.
        if os.path.isdir(dirname):
            return [basename]
    else:
        if os.path.lexists(os.path.join(dirname, basename)):
            return [basename]
    return []


# This helper function recursively yields relative pathnames inside a literal
# directory.


def glob2(dirname, pattern):
    assert _isrecursive(pattern)
    yield pattern[:0]
    for x in _rlistdir(dirname):
        yield x


# Recursively yields relative pathnames inside a literal directory.
def _rlistdir(dirname):
    if not dirname:
        if isinstance(dirname, binary_type):
            dirname = binary_type(os.curdir, 'ASCII')
        else:
            dirname = os.curdir
    try:
        names = os.listdir(dirname)
    except os.error:
        return
    for x in names:
        yield x
        path = os.path.join(dirname, x) if dirname else x
        for y in _rlistdir(path):
            yield os.path.join(x, y)


magic_check = re.compile('([*?[])')
magic_check_bytes = re.compile(b'([*?[])')


def has_magic(s):
    if isinstance(s, binary_type):
        match = magic_check_bytes.search(s)
    else:
        match = magic_check.search(s)
    return match is not None


def _isrecursive(pattern):
    if isinstance(pattern, binary_type):
        return pattern == b'**'
    else:
        return pattern == '**'


def escape(pathname):
    """Escape all special characters.
    """
    # Escaping is done by wrapping any of "*?[" between square brackets.
    # Metacharacters do not work in the drive part and shouldn't be escaped.
    drive, pathname = os.path.splitdrive(pathname)
    if isinstance(pathname, binary_type):
        pathname = magic_check_bytes.sub(br'[\1]', pathname)
    else:
        pathname = magic_check.sub(r'[\1]', pathname)
    return drive + pathname

Directory Contents

Dirs: 4 × Files: 30

Name Size Perms Modified Actions
command DIR
- drwxr-xr-x 2025-07-17 23:01:18
Edit Download
extern DIR
- drwxr-xr-x 2025-07-17 23:01:18
Edit Download
_vendor DIR
- drwxr-xr-x 2025-07-17 23:01:18
Edit Download
- drwxr-xr-x 2025-07-17 23:01:18
Edit Download
6.44 KB lrw-r--r-- 2025-07-15 09:13:40
Edit Download
5.54 KB lrw-r--r-- 2025-07-15 09:13:40
Edit Download
17.58 KB lrw-r--r-- 2025-07-15 09:13:40
Edit Download
5.70 KB lrw-r--r-- 2025-07-15 09:13:40
Edit Download
935 B lrw-r--r-- 2025-07-15 09:13:40
Edit Download
41.61 KB lrw-r--r-- 2025-07-15 09:13:40
Edit Download
1.69 KB lrw-r--r-- 2025-07-15 09:13:40
Edit Download
3.07 KB lrw-r--r-- 2025-07-15 09:13:40
Edit Download
5.08 KB lrw-r--r-- 2025-07-15 09:13:40
Edit Download
787 B lrw-r--r-- 2025-07-15 09:13:40
Edit Download
1.97 KB lrw-r--r-- 2025-07-15 09:13:40
Edit Download
5.14 KB lrw-r--r-- 2025-07-15 09:13:40
Edit Download
39.92 KB lrw-r--r-- 2025-07-15 09:13:40
Edit Download
3.12 KB lrw-r--r-- 2025-07-15 09:13:40
Edit Download
39.38 KB lrw-r--r-- 2025-07-15 09:13:40
Edit Download
10.62 KB lrw-r--r-- 2025-07-15 09:13:40
Edit Download
536 B lrw-r--r-- 2025-07-15 09:13:40
Edit Download
1.16 KB lrw-r--r-- 2025-07-15 09:13:40
Edit Download
1.15 KB lrw-r--r-- 2025-07-15 09:13:40
Edit Download
2.82 KB lrw-r--r-- 2025-07-15 09:13:40
Edit Download
13.94 KB lrw-r--r-- 2025-07-15 09:13:40
Edit Download
201 B lrw-r--r-- 2025-07-15 09:13:40
Edit Download
138 B lrw-r--r-- 2025-07-15 09:13:40
Edit Download
2.25 KB lrw-r--r-- 2025-07-15 09:13:40
Edit Download
8.29 KB lrw-r--r-- 2025-07-15 09:13:40
Edit Download
996 B lrw-r--r-- 2025-07-15 09:13:40
Edit Download
144 B lrw-r--r-- 2025-07-15 09:13:40
Edit Download
7.60 KB lrw-r--r-- 2025-07-15 09:13:40
Edit Download
714 B lrw-r--r-- 2025-07-15 09:13:40
Edit Download
5.57 KB lrw-r--r-- 2025-07-15 09:13:40
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).
© 2026 REDROOM — Secure File Manager. All rights reserved. Built with ❤️ & Red Dark UI