grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026B T�Ý®½/šã@sºdZddlZddlZddlZdddgZddœdd„Zddœd d„Zd d „Zd d „Zdd„Z dd„Z dd„Z dd„Z dd„Z dd„Ze d¡Ze d¡Zdd„Zdd„Zd d!„Zd"d„ZdS)#zFilename globbing utility.éNÚglobÚiglobÚescapeF)Ú recursivecCstt||d�ƒS)ayReturn 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ú)/opt/alt/python37/lib64/python3.7/glob.pyr s cCs,t||dƒ}|r(t|ƒ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. F)Ú_iglobÚ _isrecursiveÚnextÚAssertionError)rrÚitÚsrrr rs  ccstj |¡\}}t|ƒsN|r t‚|r8tj |¡rJ|Vntj |¡rJ|VdS|sˆ|rrt|ƒrrt|||ƒEdHnt |||ƒEdHdS||kr¦t|ƒr¦t ||dƒ}n|g}t|ƒrÌ|rÆt|ƒrÆt}qÐt }nt }x2|D]*}x$||||ƒD]}tj  ||¡VqèWqÖWdS)NT) ÚosÚpathÚsplitÚ has_magicr ÚlexistsÚisdirr Ú_glob2Ú_glob1r Ú_glob0Újoin)rrÚdironlyÚdirnameÚbasenameÚdirsZ glob_in_dirÚnamerrr r 's2     r cCs0tt||ƒƒ}t|ƒs$dd„|Dƒ}t ||¡S)Ncss|]}t|ƒs|VqdS)N)Ú _ishidden)Ú.0Úxrrr ú Rsz_glob1..)rÚ_iterdirrÚfnmatchÚfilter)rÚpatternrÚnamesrrr rOsrcCs8|stj |¡r4|gSntj tj ||¡¡r4|gSgS)N)rrrrr)rrrrrr rUs  rcCs t||dƒS)NF)r)rr&rrr Úglob0bsr(cCs t||dƒS)NF)r)rr&rrr Úglob1esr)ccs.t|ƒs t‚|dd…Vt||ƒEdHdS)Nr)r r Ú _rlistdir)rr&rrrr rks rc cs’|s"t|tƒrttjdƒ}ntj}yVt |¡�B}x:|D]2}y|rH| ¡rP|jVWq6tk rfYq6Xq6WWdQRXWntk rŒdSXdS)NÚASCII)Ú isinstanceÚbytesrÚcurdirÚscandirÚis_dirrÚOSError)rrrÚentryrrr r#rs     r#ccshtt||ƒƒ}xT|D]L}t|ƒs|V|r8tj ||¡n|}x"t||ƒD]}tj ||¡VqHWqWdS)N)rr#rrrrr*)rrr'r!rÚyrrr r*„s r*z([*?[])s([*?[])cCs(t|tƒrt |¡}n t |¡}|dk S)N)r,r-Úmagic_check_bytesÚsearchÚ magic_check)rÚmatchrrr r‘s   rcCs |ddkS)Nr)Ú.é.r)rrrr r˜srcCst|tƒr|dkS|dkSdS)Ns**z**)r,r-)r&rrr r ›s r cCs<tj |¡\}}t|tƒr(t d|¡}n t d|¡}||S)z#Escape all special characters. s[\1]z[\1])rrÚ splitdriver,r-r4Úsubr6)rZdriverrr r¡s   )Ú__doc__rÚrer$Ú__all__rrr rrr(r)rr#r*Úcompiler6r4rrr rrrrr Ús(  (