/usr/local/lib/python3.9/site-packages/django/contrib/staticfiles/__pycache__
a Ӱ�h� � @ 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� �J/usr/local/lib/python3.9/site-packages/django/contrib/staticfiles/utils.py� <genexpr> � z#matches_patterns.<locals>.<genexpr>)�any)r �patternsr r r �matches_patterns s r � c c s� |du rg }| � |�\}}|D ]4}t||�r.q|rLtj�||�}t||�rLq|V q|D ]4}t||�rhqX|rztj�||�}t| ||�E dH qXdS )zm Recursively walk the storage directories yielding the paths of all files that should be copied. N)�listdirr �osr �join� get_files)Zstorage�ignore_patterns�location�directories�files�fn�dirr r r r s"