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 s2 t d| |¡ t| |dƒ}|r.t| ƒr.t|ƒ}|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| ƒsF|r0t j | ¡rB| V nt j |¡rB| V d S |s€|rjt|ƒrjt|||ƒ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
* s0 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
Ú