U
e5dA ã @ s d Z ddlZddlZddlZddlZdddgZddœdd„Zddœd d„Zd
d„ Zdd
„ Z dd„ Z
dd„ Zdd„ Zdd„ Z
dd„ Zdd„ Ze d¡Ze d¡Zdd„ Zdd„ Zd d!„ Zd"d„ ZdS )#zFilename globbing utility.é NÚglobÚiglobÚescapeF©Ú recursivec C s t t| |d�ƒS )ay 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.
r )Úlistr )Úpathnamer © r ú/usr/lib64/python3.8/glob.pyr
s c C s: t d| |¡ t| |dƒ}|r6t| ƒr6t|ƒ}|r6t‚|S )aŒ 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.
z glob.globF)ÚsysÚauditÚ_iglobÚ_isrecursiveÚnextÚAssertionError)r r ÚitÚsr r r
r s c c s t j | ¡\}}t| ƒsN|r t‚|r8t j | ¡rJ| V nt j |¡rJ| V d S |sˆ|rrt|ƒrrt|||ƒE d H nt |||ƒE d H d S || kr¦t|ƒr¦t
||dƒ}n|g}t|ƒrÌ|rÆt|ƒrÆt}qÐt }nt}|D ]&}||||ƒD ]}t j ||¡V qäqÔd S )NT)
ÚosÚpathÚsplitÚ has_magicr ÚlexistsÚisdirr Ú_glob2Ú_glob1r
Ú_glob0Újoin)r r ÚdironlyÚdirnameÚbasenameÚdirsZglob_in_dirÚnamer r r
r
) s2 r
c C s0 t t| |ƒƒ}t|ƒs$dd„ |D ƒ}t ||¡S )Nc s s | ]}t |ƒs|V qd S ©N)Ú _ishidden)Ú.0Úxr r r
Ú