a
´i¿ ã @ sÐ d Z ddlZddlZddlZddlZddlZg d¢Zddœdd„Zddœdd „Zd
d„ Z dd
„ Z
dd„ Zdd„ Zdd„ Z
dd„ Zdd„ Zdd„ Zdd„ Ze d¡Ze d¡Zdd„ Zd d!„ 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.9/glob.pyr s r c C s: t d| |¡ t| |dƒ}|r6t| ƒr6t|ƒ}|r6J ‚|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)r r ÚitÚsr r r
r s r c c s t j | ¡\}}t| ƒsN|r J ‚|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_magicÚlexistsÚisdirr Ú_glob2Ú_glob1r
Ú_glob0Újoin)r r ÚdironlyÚdirnameÚbasenameÚdirsZglob_in_dirÚnamer r r
r
* s2 r
c C s, t | |ƒ}t|ƒs dd„ |D ƒ}t ||¡S )Nc s s | ]}t |ƒs|V qd S ©N)Ú _ishidden)Ú.0Úxr r r
Ú