
    ǆi                         S r SSKrSSKrSSKr/ SQrSS jrSS jrS rS rS r	S	 r
S
 r\R                  " S5      r\R                  " S5      rS rS rS rg)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)globiglobescapec                 &    [        [        XS95      $ )a]  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.
)	recursive)listr   )pathnamer   s     _/home/dmtnaga/Documents/work/airagagent/rag_env/lib/python3.13/site-packages/setuptools/glob.pyr   r      s     h455    c                 r    [        X5      nU(       a$  [        U 5      (       a  [        U5      nU(       a   eU$ )ap  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.
)_iglob_isrecursivenext)r	   r   itss       r
   r   r      s0     
	$B\(++HuIr   c              #     #    [         R                  R                  U 5      u  p#U(       a  [        U5      (       a  [        O[
        n[        U 5      (       dY  U(       a)  [         R                  R                  U 5      (       a  U v   g [         R                  R                  U5      (       a  U v   g U(       d  U" X#5       S h  vN   g X :w  a  [        U5      (       a  [        X!5      nOU/n[        U5      (       d  [        nU H3  nU" X#5       H$  n[         R                  R                  X&5      v   M&     M5     g  Ny7fN)ospathsplitr   glob2glob1	has_magiclexistsisdirr   glob0join)r	   r   dirnamebasenameglob_in_dirdirsnames          r
   r   r   0   s     h/G$h)?)?%UKXwwx((
 	 ww}}W%%w111 y11g)yX2D'',,w-- 3  	2s   C D>D<A:D>c                    U (       dE  [        U[        5      (       a   [        R                  R	                  S5      n O[        R                  n  [        R
                  " U 5      n[        R                  " X!5      $ ! [         a    / s $ f = fNASCII)	
isinstancebytesr   curdirencodelistdirOSErrorfnmatchfilter)r   patternnamess      r
   r   r   T   si    gu%%ii&&w/GiiG

7# >>%))  	s   A: :B	B	c                     U(       d*  [         R                  R                  U 5      (       a  U/$  / $ [         R                  R                  [         R                  R	                  X5      5      (       a  U/$ / $ r   )r   r   r   r   r   )r   r   s     r
   r   r   a   s]     77==!!: "
 I 77??277<<:;;:Ir   c              #   h   #    [        U5      (       d   eUS S v   [        U 5       S h  vN   g  N7f)Nr   )r   	_rlistdir)r   r.   s     r
   r   r   q   s0         
"1+!!!s   (202c              #     #    U (       dE  [        U [        5      (       a   [        R                  R	                  S5      n O[        R                  n  [        R
                  " U 5      nU Hb  nUv   U (       a  [        R                  R                  X5      OUn[        U5       H$  n[        R                  R                  X$5      v   M&     Md     g ! [         a     g f = f7fr$   )
r&   r'   r   r(   r)   r*   r+   r   r   r2   )r   r/   xr   ys        r
   r2   r2   x   s     gu%%ii&&w/GiiG

7# +2rww||G'4A'',,q$$ !   s+   ACC &A)C
CCCCz([*?[])s   ([*?[])c                     [        U [        5      (       a  [        R                  U 5      nUS L$ [        R                  U 5      nUS L$ r   )r&   r'   magic_check_bytessearchmagic_check)r   matchs     r
   r   r      sI    !U!((+  ""1%r   c                 @    [        U [        5      (       a  U S:H  $ U S:H  $ )Ns   **z**)r&   r'   )r.   s    r
   r   r      s$    '5!!%$r   c                     [         R                  R                  U 5      u  p[        U [        5      (       a  [
        R                  SU 5      n X-   $ [        R                  SU 5      n X-   $ )zEscape all special characters.s   [\1]z[\1])r   r   
splitdriver&   r'   r7   subr9   )r	   drives     r
   r   r      s_     gg((2OE(E""$((8<  ??7H5r   )F)__doc__r   rer,   __all__r   r   r   r   r   r   r2   compiler9   r7   r   r   r    r   r
   <module>rE      sl    
 	 
%6$.H
*	 "%" jj#JJz* 	r   