efdZddlZddlZddlZgdZddZddZdZdZd Z d Z d Z ej d Z ej d ZdZdZdZdS)z Filename globbing utility. Mostly a copy of `glob` from Python 3.5. Changes include: * `yield from` and PEP3102 `*` removed. * Hidden files are not ignored. N)globiglobescapeFc>tt||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. ) recursive)listr)pathnamers o/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib/python3.11/site-packages/setuptools/glob.pyrrs h)444 5 55cnt||}|r"t|rt|}|rJ|S)aReturn 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. )_iglob _isrecursivenext)r ritss r rrsC ) $ $B\(++ HH u Ir c#VKtj|\}}|rt|rtnt }t |sK|r$tj|r|Vn#tj|r|VdS|s|||Ed{VdS||kr t |rt||}n|g}t |st}|D]3}|||D]$}tj ||V%4dSN) ospathsplitrglob2glob1 has_magiclexistsisdirr glob0join)r rdirnamebasename glob_in_dirdirsnames r r r 0sg h//GX$Jh)?)?J%%UK X    wx(( w}}W%%  ;w111111111(y11gy))y X   ..K22 . .D',,w-- - - - - ...r c|sAt|tr tjd}n tj} tj|}n#t $rgcYSwxYwtj||SNASCII) isinstancebytesrcurdirencodelistdirOSErrorfnmatchfilter)rpatternnamess r rrTs  gu % % i&&w//GGiG 7##   >% ) ))sA A)(A)c|s#tj|r|gSn@tjtj||r|gSgSr)rrrrr)rrs r rrasd  7== ! ! :   7??27<<:: ; ; :  Ir c#pKt|sJ|ddVt|D]}|VdS)Nr)r _rlistdir)rr.xs r rrqsZ    "1"+ w  r c#K|sAt|tr tjd}n tj} tj|}n#tj$rYdSwxYw|D]^}|V|r tj||n|}t|D]$}tj||V%_dSr$) r&r'rr(r)r*errorrrr2)rr/r3rys r r2r2ys  gu % % i&&w//GGiG 7## 8 %%+29rw||GQ'''4 % %A',,q!$$ $ $ $ $ %%%sAA/.A/z([*?[])s([*?[])ct|trt|}nt|}|duSr)r&r'magic_check_bytessearch magic_check)rmatchs r rrsG!U&!((++""1%%  r cDt|tr|dkS|dkS)Ns**z**)r&r')r.s r rrs)'5!!%$r ctj|\}}t|trt d|}ntd|}||zS)zEscape all special characters.s[\1]z[\1])rr splitdriver&r'r8subr:)r drives r rrsdg((22OE8(E""6$((8<<??7H55 8 r )F)__doc__rrer,__all__rrr rrrr2compiler:r8rrrr r rFs  % % % 6 6 6 6$...H * * *    %%%"bj## BJz**     r