
    Ixh	                         d Z ddlZddlZddlZg dZddZddZd Zd Zd	 Z	d
 Z
d Z ej        d          Z ej        d          Zd Zd Zd ZdS )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escapeFc                 >    t          t          | |                    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.
    )	recursive)listr   )pathnamer   s     B/var/www/html/what/lib/python3.11/site-packages/setuptools/glob.pyr   r      s     h)444555    c                 n    t          | |          }|r"t          |           rt          |          }|rJ |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.
    )_iglob_isrecursivenext)r	   r   itss       r
   r   r      sC     
)	$	$B \(++ HHIr   c              #   V  K   t           j                            |           \  }}|rt          |          rt          nt
          }t          |           sK|r$t           j                            |           r| V  n#t           j                            |          r| V  d S |s |||          E d {V  d S || k    r t          |          rt          ||          }n|g}t          |          st          }|D ]3} |||          D ]$}t           j                            ||          V  %4d S 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   sg     h//GX$Jh)?)?J%%UKX  	wx((  w}}W%%  ;w111111111 (y11gy))yX  . .K22 	. 	.D',,w------	.. .r   c                    | sAt          |t                    r t          j                            d          } nt          j        } 	 t          j        |           }n# t          $ r g cY S w xY wt          j        ||          S NASCII)	
isinstancebytesr   curdirencodelistdirOSErrorfnmatchfilter)r   patternnamess      r
   r   r   T   s      gu%% 	 i&&w//GGiG
7##   			>%)))s   A A)(A)c                     |s#t           j                            |           r|gS n@t           j                            t           j                            | |                    r|gS g S r   )r   r   r   r   r   )r   r   s     r
   r   r   a   sd      7==!! 	:	 7??27<<::;; 	:Ir   c              #   p   K   t          |          sJ |d d         V  t          |           D ]}|V  d S )Nr   )r   	_rlistdir)r   r.   xs      r
   r   r   q   sZ           
"1"+w   r   c              #     K   | sAt          | t                    r t          j                            d          } nt          j        } 	 t          j        |           }n# t          j        $ r Y d S w xY w|D ]^}|V  | r t          j                            | |          n|}t          |          D ]$}t          j                            ||          V  %_d S r$   )
r&   r'   r   r(   r)   r*   errorr   r   r2   )r   r/   r3   r   ys        r
   r2   r2   y   s        gu%% 	 i&&w//GGiG
7##8    % %+29rw||GQ'''4 	% 	%A',,q!$$$$$$	%% %s   A A/.A/z([*?[])s   ([*?[])c                     t          | t                    rt                              |           }nt                              |           }|d uS r   )r&   r'   magic_check_bytessearchmagic_check)r   matchs     r
   r   r      sG    !U &!((++""1%%r   c                 D    t          | t                    r| dk    S | dk    S )Ns   **z**)r&   r'   )r.   s    r
   r   r      s)    '5!! %$r   c                     t           j                            |           \  }} t          | t                    rt
                              d|           } nt                              d|           } || z   S )z#Escape all special characters.
    s   [\1]z[\1])r   r   
splitdriver&   r'   r8   subr:   )r	   drives     r
   r   r      sd    
 g((22OE8(E"" 6$((8<<??7H558r   )F)__doc__r   rer,   __all__r   r   r   r   r   r   r2   compiler:   r8   r   r   r    r   r
   <module>rF      s    
			 				 
%
%
%6 6 6 6   $. . .H
* 
* 
*	 	 	   % % %" bj##BJz**     
 
 
 
 
r   