
    ʆhX                        S r SSKJr  SSKJrJr  SSKJr  \(       a  SSKJ	r	            SS jr
SSSS	.         SS
 jjrSSSS	.         SS jjrg)u  :module: watchdog.utils.patterns
:synopsis: Common wildcard searching/filtering functionality for files.
:author: boris.staletic@gmail.com (Boris Staletic)
:author: yesudeep@gmail.com (Yesudeep Mangalapilly)
:author: contact@tiger-222.fr (Mickaël Schoentgen)
    )annotations)PurePosixPathPureWindowsPath)TYPE_CHECKING)Iteratorc               t  ^ U(       a  [        U 5      mOIU Vs1 s H  oDR                  5       iM     nnU Vs1 s H  oDR                  5       iM     nn[        U 5      mX-  nU(       a  SU S3n[        U5      e[	        U4S jU 5       5      =(       a    [	        U4S jU 5       5      (       + $ s  snf s  snf )zJInternal function same as :func:`match_path` but does not check arguments.zconflicting patterns `z` included and excludedc              3  F   >#    U  H  nTR                  U5      v   M     g 7fNmatch.0ppaths     O/opt/services/DDDS/venv/lib/python3.13/site-packages/watchdog/utils/patterns.py	<genexpr>_match_path.<locals>.<genexpr>-   s     8&7tzz!}}&7   !c              3  F   >#    U  H  nTR                  U5      v   M     g 7fr
   r   r   s     r   r   r   -   s     Dn\mWXTZZPQ]]\mr   )r   lowerr   
ValueErrorany)raw_pathincluded_patternsexcluded_patternscase_sensitivepatterncommon_patternserrorr   s          @r   _match_pathr       s     X&<MN<M]]_<MN<MN<M]]_<MNx(';O((99PQ8&788nDn\mDnAn=nn ONs
   B0B5NTr   r   r   c             #     #    [        Uc  S/OU5      n[        Uc  / OU5      nU  H  n[        XdXSS9(       d  M  Uv   M     g7f)a  Filters from a set of paths based on acceptable patterns and
ignorable patterns.
:param paths:
    A list of path names that will be filtered based on matching and
    ignored patterns.
:param included_patterns:
    Allow filenames matching wildcard patterns specified in this list.
    If no pattern list is specified, ["*"] is used as the default pattern,
    which matches all files.
:param excluded_patterns:
    Ignores filenames matching wildcard patterns specified in this list.
    If no pattern list is specified, no files are ignored.
:param case_sensitive:
    ``True`` if matching should be case-sensitive; ``False`` otherwise.
:returns:
    A list of pathnames that matched the allowable patterns and passed
    through the ignored patterns.
N*)r   )setr    )pathsr   r   r   includedexcludedr   s          r   filter_pathsr(   0   sK     2 -5C5;LMH*228IJHtxOOJ s
   4A	Ac          	     ,    [        [        U UUUS95      $ )zMatches from a set of paths based on acceptable patterns and
ignorable patterns.
See ``filter_paths()`` for signature details.
r!   )r   r(   )r%   r   r   r   s       r   match_any_pathsr*   Q   s%     //)		
     )
r   strr   set[str]r   r-   r   boolreturnr.   )
r%   	list[str]r   list[str] | Noner   r1   r   r.   r/   zIterator[str])
r%   r0   r   r1   r   r1   r   r.   r/   r.   )__doc__
__future__r   pathlibr   r   typingr   collections.abcr   r    r(   r*    r+   r   <module>r8      s    # 3  (ooo  o
 o 
o6 +/*. ( (	
  H +/*. ( (	
  
r+   