File: //usr/lib/python3/dist-packages/django/contrib/staticfiles/__pycache__/utils.cpython-310.pyc
o
�a� � @ sH d dl Z d dlZd dlmZ d dlmZ dd� Zddd�Zdd d
�ZdS )
� N)�settings)�ImproperlyConfiguredc s t � fdd�|D ��S )z�
Return True or False depending on whether the ``path`` should be
ignored (if it matches any pattern in ``ignore_patterns``).
c 3 s � | ] }t �� |�V qd S �N)�fnmatch�fnmatchcase)�.0�pattern��path� �B/usr/lib/python3/dist-packages/django/contrib/staticfiles/utils.py� <genexpr>
s � z#matches_patterns.<locals>.<genexpr>)�any)r
�patternsr r r �matches_patterns s r � c c s� � |du rg }| � |�\}}|D ]}t||�rq|r'tj�||�}t||�r'q|V q|D ]}t||�r5q-|r>tj�||�}t| ||�E dH q-dS )zm
Recursively walk the storage directories yielding the paths
of all files that should be copied.
N)�listdirr �osr
�join� get_files)�storage�ignore_patterns�location�directories�files�fn�dirr r r r s&