Spade
Mini Shell
| Directory:~$ /proc/self/root/usr/lib/python3.6/site-packages/setuptools/__pycache__/ |
| [Home] [System Details] [Kill Me] |
3
J$�\W�@s�dZddlZddlZddlZddlmZdddgZddd�Zdd d�Zd
d�Z dd
�Z
dd�Zdd�Zdd�Z
ejd�Zejd�Zdd�Zdd�Zdd�ZdS)z�
Filename globbing utility. Mostly a copy of `glob` from Python 3.5.
Changes include:
* `yield from` and PEP3102 `*` removed.
* `bytes` changed to `six.binary_type`.
* Hidden files are not ignored.
�N)�binary_type�glob�iglob�escapeFcCstt||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.
)� recursive)�listr)�pathnamer�r �/usr/lib/python3.6/glob.pyrscCs"t||�}|rt|�rt|�}|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)rr�it�sr r r
r s
ccstjj|�\}}t|�sF|r0tjj|�rB|Vntjj|�rB|VdS|s�|rrt|�rrx4t||�D]
}|VqbWnxt||�D]
}|Vq~WdS||kr�t|�r�t ||�}n|g}t|�r�|r�t|�r�t}q�t}nt
}x0|D](}x"|||�D]}tjj||�Vq�Wq�WdS)N)�os�path�split� has_magic�lexists�isdirr�glob2�glob1r�glob0�join)rr�dirname�basename�x�dirsZglob_in_dir�namer r r
r2s4
rcCsR|s"t|t�rtjjd�}ntj}ytj|�}Wntk
rDgSXtj||�S)N�ASCII) �
isinstancerr�curdir�encode�listdir�OSError�fnmatch�filter)r�pattern�namesr r r
r]s
rcCs8|stjj|�r4|gSntjjtjj||��r4|gSgS)N)rrrrr)rrr r r
rjsrccs*|dd�Vxt|�D]
}|VqWdS)Nr)� _rlistdir)rr'rr r r
rzsrc
cs�|s"t|t�rttjd�}ntj}ytj|�}Wntjk
rFdSXxJ|D]B}|V|rjtjj||�n|}x
t|�D]}tjj||�VqxWqNWdS)Nr) r
rrr!r#�errorrrr))rr(rr�yr r r
r)�s
r)z([*?[])s([*?[])cCs(t|t�rtj|�}n
tj|�}|dk S)N)r
r�magic_check_bytes�search�magic_check)r�matchr r r
r�s
rcCst|t�r|dkS|dkSdS)Ns**z**)r r)r'r r r
r�s
rcCs<tjj|�\}}t|t�r(tjd|�}ntjd|�}||S)z#Escape
all special characters.
s[\1]z[\1])rr�
splitdriver rr,�subr.)rZdriver r r
r�s
)F)F)�__doc__r�rer%Zsetuptools.extern.sixr�__all__rrrrrrr)�compiler.r,rrrr r r r
�<module>s"
+