Ë
    ålÖi˜X  ã                   óŒ  — d Z ddlZddlZddlZddlZddlZddlZddlZddlm	Z
mZ ddlmZ ddlmZ ddlmZmZmZm	Z	mZmZmZmZmZmZmZmZmZmZmZ ddlmZ ej@                  d	k\  ree!ee!   f   Z"nee!ef   Z" ed
e"¬«      Z#	 ejH                  ejJ                  fD � cg c]  } | r| ejH                  k7  r| ‘Œ c} Z&	 i Z'	 dejP                  de!fd„Z)deee*ef      de!deee+   ee*   f   fd„Z,	 d8dee   dee!   dee+   dee!df   fd„Z-dee   deee*ef      fd„Z.dede+fd„Z/	 	 d9de"deee0gdf      dee+   ded   fd„Z1de!de!d ee!e!f   dee0gdf   de+ded   fd!„Z2	 	 d9de"deee0gdf      dee+   dee!   fd"„Z3d9d#„Z4d$e!deegef   fd%„Z5dee   de!de+fd&„Z6dee   dee!   dee!   fd'„Z7	 d8de"d(ee	e!      de!fd)„Z8	 d8dee"   d(ee	e!      dee!ee"   f   fd*„Z9	 d8d$e!d+eegef   d,ee+   ddfd-„Z: G d.„ d/e;«      Z< G d0„ d1e;«      Z= ed2¬3«       G d4„ d5ee#   «      «       Z> G d6„ de?«      Z@ G d7„ de?«      ZAyc c} w ):zC
This module provides utility methods for dealing with path-specs.
é    N)Ú
CollectionÚIterable)Ú	dataclass)ÚPathLike)ÚAnyÚAnyStrÚCallabler   ÚDictÚGenericr   ÚIteratorÚListÚOptionalÚSequenceÚSetÚTupleÚTypeVarÚUnioné   )ÚPattern)é   é	   ÚTStrPath)ÚboundÚpathÚreturnc                 ób   — t        | «      }| j                  «       r|t        j                  z  }|S )a5  
	Appends the path separator to the path if the path is a directory.
	This can be used to aid in distinguishing between directories and
	files on the file-system by relying on the presence of a trailing path
	separator.

	*path* (:class:`pathlib.Path`) is the path to use.

	Returns the path (:class:`str`).
	)ÚstrÚis_dirÚosÚsep)r   Ústr_paths     úR/var/www/html/strategist-ai/venv_dbt/lib/python3.12/site-packages/pathspec/util.pyÚappend_dir_sepr#   D   s)   € ô �‹I€Ø‡K�K„MØ
Œb�f‰fÑ€(à€ó    ÚpatternsÚfilec                 ó€   — d}d}| D ]2  \  }}|j                   €Œ|j                  |«      €Œ%|j                   }|}Œ4 ||fS )aö  
	Check the file against the patterns.

	*patterns* (:class:`~collections.abc.Iterable`) yields each indexed pattern
	(:class:`tuple`) which contains the pattern index (:class:`int`) and actual
	pattern (:class:`~pathspec.pattern.Pattern`).

	*file* (:class:`str`) is the normalized file path to be matched
	against *patterns*.

	Returns a :class:`tuple` containing whether to include *file* (:class:`bool`
	or :data:`None`), and the index of the last matched pattern (:class:`int` or
	:data:`None`).
	N©ÚincludeÚ
match_file)r%   r&   Úout_includeÚ	out_indexÚindexÚpatterns         r"   Úcheck_match_filer/   V   sV   € ð$  $€Ø €Øò �^€UˆGØ‡_�_Ñ  W×%7Ñ%7¸Ó%=Ñ%IØ—‘€;Ø�9ðð
 	�YÐÐr$   ÚfilesÚall_matchesÚMatchDetailc                 óX  — t        |t        «      r|n
t        |«      }i }| D ]…  }|j                  €Œ|j	                  |«      }|j                  rO|D ]I  }||v r4|r||   j
                  j                  |«       Œ(|||   j
                  d<   Œ;t        |g«      ||<   ŒK Œ||D ]  }||= Œ Œ‡ |S )a²  
	Matches the files to the patterns, and returns which patterns matched
	the files.

	*patterns* (:class:`~collections.abc.Iterable` of :class:`~pathspec.pattern.Pattern`)
	contains the patterns to use.

	*files* (:class:`~collections.abc.Iterable` of :class:`str`) contains
	the normalized file paths to be matched against *patterns*.

	*all_matches* (:class:`bool` or :data:`None`) is whether to return all
	matches patterns (:data:`True`), or only the last matched pattern
	(:data:`False`). Default is :data:`None` for :data:`False`.

	Returns the matched files (:class:`dict`) which maps each matched file
	(:class:`str`) to the patterns that matched in order (:class:`.MatchDetail`).
	r   )Ú
isinstanceÚCollectionTypeÚlistr)   Úmatchr%   Úappendr2   )	r%   r0   r1   Ú	all_filesÚreturn_filesr.   Úresult_filesÚresult_filer&   s	            r"   Údetailed_match_filesr=   r   sÅ   € ô, ! ¬Ô7‰U¼TÀ%»[€Ø€Øò €WØ‡_�_Ñ Ø—-‘- 	Ó*€<Ø‡o‚oà#ò 9ˆØ�|Ñ#Ù	Ø�KÑ ×)Ñ)×0Ñ0°Õ9à/6€|�KÑ ×)Ñ)¨!Ò,ä"-¨w¨iÓ"8€l�;Òñ9ð ò ˆØ	�dÑ	ñð!ð& 	Ðr$   c                 óf   — t        | «      D ��cg c]  \  }}|j                  �||f‘Œ c}}S c c}}w )a&  
	Filters out null-patterns.

	*patterns* (:class:`Iterable` of :class:`.Pattern`) contains the
	patterns.

	Returns a :class:`list` containing each indexed pattern (:class:`tuple`) which
	contains the pattern index (:class:`int`) and the actual pattern
	(:class:`~pathspec.pattern.Pattern`).
	)Ú	enumerater)   )r%   Ú__indexÚ__pats      r"   Ú_filter_check_patternsrB       s<   € ô " (Ó+÷	á€gˆuØ
‡]�]Ðð ˆEÒó	ð ùó 	s   �-Úvaluec                 óT   — t        | t        «      xr t        | t        t        f«       S )z˜
	Check whether the value is an iterable (excludes strings).

	*value* is the value to check,

	Returns whether *value* is a iterable (:class:`bool`).
	)r4   ÚIterableTyper   Úbytes)rC   s    r"   Ú_is_iterablerG   ´   s$   € ô 	�5œ,Ó'ÒO´
¸5Ä3ÌÀ,Ó0OÐ,OÐOr$   ÚrootÚon_errorÚfollow_linksÚ	TreeEntryc              #   ó¸   K  — |�t        |«      st        d|›d�«      ‚|€d}t        t        j                  j                  | «      di ||«      E d{  –—†  y7 Œ­w)a  
	Walks the specified directory for all files and directories.

	*root* (:class:`str` or :class:`os.PathLike`) is the root directory to
	search.

	*on_error* (:class:`~collections.abc.Callable` or :data:`None`)
	optionally is the error handler for file-system exceptions. It will be
	called with the exception (:exc:`OSError`). Reraise the exception to
	abort the walk. Default is :data:`None` to ignore file-system
	exceptions.

	*follow_links* (:class:`bool` or :data:`None`) optionally is whether
	to walk symbolic links that resolve to directories. Default is
	:data:`None` for :data:`True`.

	Raises :exc:`RecursionError` if recursion is detected.

	Returns an :class:`~collections.abc.Iterator` yielding each file or
	directory entry (:class:`.TreeEntry`) relative to *root*.
	Nz	on_error:ú is not callable.TÚ )ÚcallableÚ	TypeErrorÚ_iter_tree_entries_nextr   r   Úabspath©rH   rI   rJ   s      r"   Úiter_tree_entriesrT   ¿   sX   è ø€ ð4 Ð¤¨(Ô!3Ü�I˜h˜\Ð):Ð;Ó<Ð<àÐØ€,ä#¤B§G¡G§O¡O°DÓ$9¸2¸rÀ8È\ÓZ×ZÒZús   ‚AAÁAÁAÚ	root_fullÚdir_relÚmemoc           	   #   óx  K  — t         j                  j                  | |«      }t         j                  j                  |«      }||vr|||<   nt	        |||   |¬«      ‚t        j
                  |«      5 }|D ]â  }t         j                  j                  ||j                  «      }		 |j                  d¬«      }
|j                  «       r	 |j                  «       }n|
}|j                  |¬«      r2t        |j                  |	|
|«      –— t        | |	|||«      E d{  –—†  Œ¨|j                  «       s|j                  «       sŒÉt        |j                  |	|
|«      –— Œä 	 ddd«       ||= y# t        $ r}|� ||«       Y d}~�Œd}~ww xY w# t        $ r}|� ||«       Y d}~�Œ,d}~ww xY w7 Œ‘# 1 sw Y   ||= yxY w­w)aq  
	Scan the directory for all descendant files.

	*root_full* (:class:`str`) the absolute path to the root directory.

	*dir_rel* (:class:`str`) the path to the directory to scan relative to
	*root_full*.

	*memo* (:class:`dict`) keeps track of ancestor directories
	encountered. Maps each ancestor real path (:class:`str`) to relative
	path (:class:`str`).

	*on_error* (:class:`~collections.abc.Callable` or :data:`None`)
	optionally is the error handler for file-system exceptions.

	*follow_links* (:class:`bool`) is whether to walk symbolic links that
	resolve to directories.

	Yields each entry (:class:`.TreeEntry`).
	)Ú	real_pathÚ
first_pathÚsecond_pathF)Úfollow_symlinksN)r   r   ÚjoinÚrealpathÚRecursionErrorÚscandirÚnameÚstatÚOSErrorÚ
is_symlinkr   rK   rQ   Úis_file)rU   rV   rW   rI   rJ   Údir_fullÚdir_realÚ	scan_iterÚnode_entÚnode_relÚ
node_lstatÚeÚ	node_stats                r"   rQ   rQ   â   s   è ø€ ô6 �G‰G�L‰L˜ GÓ,€Ü�G‰G×Ñ˜XÓ&€ð
 �DÑØ€$€x‚.ä °d¸8±nÐRYÔZÐZä‡j�j�Óð !D˜iàò D€hÜ�g‰g�l‰l˜7 H§M¡MÓ2€8ðØ—‘¨u�Ó5€Jð ×ÑÔðØ—‘“�Yð €Ià‡o�o l€oÔ3ô �H—M‘M 8¨Z¸Ó
CÒCä& y°(¸DÀ(ÈLÓY×YÑYà×ÑÔ˜h×1Ñ1Õ3ä
�H—M‘M 8¨Z¸Ó
CÓCñ?D÷!DðP 
ˆ(�^øôA ò ØÐÙˆa„[Ýûðûô ò ØÐÙˆq„kÝûðúð Zø÷;!DðP 
ˆ(�^üs…   ‚A0F:Á20F+Â#E'Â5F+ÃFÃAF+ÄF)Ä%F+Ä>F+ÅF:Å'	FÅ0
F Å:F+Æ FÆF+Æ	F&Æ
F!ÆF+Æ!F&Æ&F+Æ+F7Æ0
F:c              #   ór   K  — t        | ||¬«      D ]"  }|j                  |«      rŒ|j                  –— Œ$ y­w)aû  
	Walks the specified directory for all files.

	*root* (:class:`str` or :class:`os.PathLike`) is the root directory to
	search for files.

	*on_error* (:class:`~collections.abc.Callable` or :data:`None`)
	optionally is the error handler for file-system exceptions. It will be
	called with the exception (:exc:`OSError`). Reraise the exception to
	abort the walk. Default is :data:`None` to ignore file-system
	exceptions.

	*follow_links* (:class:`bool` or :data:`None`) optionally is whether
	to walk symbolic links that resolve to directories. Default is
	:data:`None` for :data:`True`.

	Raises :exc:`RecursionError` if recursion is detected.

	Returns an :class:`~collections.abc.Iterator` yielding the path to
	each file (:class:`str`) relative to *root*.
	©rI   rJ   N)rT   r   r   )rH   rI   rJ   Úentrys       r"   Úiter_tree_filesrq   3  s6   è ø€ ô4   ¨xÀlÔSò €UØ	�‰�lÕ	#Ø	�‰Óñùs   ‚#7¦7c                 óV   — t        j                  dt        d¬«       t        | ||¬«      S )zg
	DEPRECATED: The :func:`.iter_tree` function is an alias for the
	:func:`.iter_tree_files` function.
	zCutil.iter_tree() is deprecated. Use util.iter_tree_files() instead.é   ©Ú
stacklevelro   )ÚwarningsÚwarnÚDeprecationWarningrq   rS   s      r"   Ú	iter_treery   R  s)   € ô
 
‡�ØGÜ 1õ&ô 	˜ x¸lÔKÐKr$   ra   c                 ó   — t         |    S )zú
	Lookups a registered pattern factory by name.

	*name* (:class:`str`) is the name of the pattern factory.

	Returns the registered pattern factory (:class:`~collections.abc.Callable`).
	If no pattern factory is registered, raises :exc:`KeyError`.
	)Ú_registered_patterns)ra   s    r"   Úlookup_patternr|   ]  s   € ô 	˜TÑ"Ð"r$   c                 ón   — d}| D ]-  }|j                   €Œ|j                  |«      €Œ"|j                   }Œ/ |S )a7  
	Matches the file to the patterns.

	*patterns* (:class:`~collections.abc.Iterable` of :class:`~pathspec.pattern.Pattern`)
	contains the patterns to use.

	*file* (:class:`str`) is the normalized file path to be matched
	against *patterns*.

	Returns :data:`True` if *file* matched; otherwise, :data:`False`.
	Fr(   )r%   r&   Úmatchedr.   s       r"   r*   r*   i  sB   € ð €Øò €WØ‡_�_Ñ  W×%7Ñ%7¸Ó%=Ñ%IØ�_‰_�7ðð 	€r$   c                 óú   — t        j                  t        › dt        › d�t        d¬«       | D �cg c]  }|j                  €Œ|‘Œ }}t        «       }|D ]   }t        ||«      sŒ|j                  |«       Œ" |S c c}w )aè  
	DEPRECATED: This is an old function no longer used. Use the
	:func:`~pathspec.util.match_file` function with a loop for better results.

	Matches the files to the patterns.

	*patterns* (:class:`~collections.abc.Iterable` of :class:`~pathspec.pattern.Pattern`)
	contains the patterns to use.

	*files* (:class:`~collections.abc.Iterable` of :class:`str`) contains
	the normalized file paths to be matched against *patterns*.

	Returns the matched files (:class:`set` of :class:`str`).
	z".match_files() is deprecated. Use z-.match_file() with a loop for better results.rs   rt   )rv   rw   Ú__name__rx   r)   Úsetr*   Úadd)r%   r0   rA   Úuse_patternsr:   r&   s         r"   Úmatch_filesr„   }  s…   € ô$ 
‡�Ü€JÐ0´°
ð ;ð  ä 1õ&ð
 %-ÖJ˜5°·±Ñ0I’ÐJ€ÐJä“€Øò €TÜ�˜dÕ#Ø×Ñ�DÕðð 	Ðùò Ks   ¯A8ÁA8Ú
separatorsc                 óê   — |€t         }t        j                  | «      }|D ]"  }|j                  |t        j
                  «      }Œ$ |j                  d«      r|dd }|S |j                  d«      r|dd }|S )ay  
	Normalizes the file path to use the POSIX path separator (i.e.,
	``"/"``), and make the paths relative (remove leading ``"/"``).

	*file* (:class:`str` or :class:`os.PathLike`) is the file path.

	*separators* (:class:`~collections.abc.Collection` of :class:`str`; or
	``None``) optionally contains the path separators to normalize.
	This does not need to include the POSIX path separator (``"/"``),
	but including it will not affect the results. Default is ``None``
	for ``NORMALIZE_PATH_SEPS``. To prevent normalization, pass an
	empty container (e.g., an empty tuple ``()``).

	Returns the normalized file path (:class:`str`).
	Nú/r   z./rs   )ÚNORMALIZE_PATH_SEPSr   ÚfspathÚreplaceÚ	posixpathr    Ú
startswith)r&   r…   Ú	norm_filer    s       r"   Únormalize_filerŽ   ž  s‡   € ð( ÐÜ"€*ô —)‘)˜D“/€àò 4€SØ×Ñ ¤Y§]¡]Ó3�)ð4ð ×Ñ˜Ôà˜˜ˆm€)ð 	Ðð	 ×Ñ˜4Ô à˜˜ˆm€)àÐr$   c                 ó¨   — t        j                  dt        d¬«       i }| D ].  }t        ||¬«      }||v r||   j	                  |«       Œ)|g||<   Œ0 |S )aš  
	DEPRECATED: This function is no longer used. Use the :func:`.normalize_file`
	function with a loop for better results.

	Normalizes the file paths to use the POSIX path separator.

	*files* (:class:`~collections.abc.Iterable` of :class:`str` or
	:class:`os.PathLike`) contains the file paths to be normalized.

	*separators* (:class:`~collections.abc.Collection` of :class:`str`; or
	:data:`None`) optionally contains the path separators to normalize.
	See :func:`normalize_file` for more information.

	Returns a :class:`dict` mapping each normalized file path (:class:`str`)
	to the original file paths (:class:`list` of :class:`str` or
	:class:`os.PathLike`).
	z_util.normalize_files() is deprecated. Use util.normalize_file() with a loop for better results.rs   rt   )r…   )rv   rw   rx   rŽ   r8   )r0   r…   Ú
norm_filesr   r�   s        r"   Únormalize_filesr‘   Æ  sk   € ô* 
‡�ð$ä 1õ&ð
 €Øò "€TÜ˜T¨jÔ9€)Ø�*ÑØˆiÑ×Ñ Õ%à ˜6€:ˆiÒð"ð 	Ðr$   Úpattern_factoryÚoverridec                 óÂ   — t        | t        «      st        d| ›d�«      ‚t        |«      st        d|›d�«      ‚| t        v r|st        | t        |    «      ‚|t        | <   y)aE  
	Registers the specified pattern factory.

	*name* (:class:`str`) is the name to register the pattern factory
	under.

	*pattern_factory* (:class:`~collections.abc.Callable`) is used to
	compile patterns. It must accept an uncompiled pattern (:class:`str`)
	and return the compiled pattern (:class:`.Pattern`).

	*override* (:class:`bool` or :data:`None`) optionally is whether to
	allow overriding an already registered pattern under the same name
	(:data:`True`), instead of raising an :exc:`AlreadyRegisteredError`
	(:data:`False`). Default is :data:`None` for :data:`False`.
	zname:z is not a string.zpattern_factory:rM   N)r4   r   rP   rO   r{   ÚAlreadyRegisteredError)ra   r’   r“   s      r"   Úregister_patternr–   ë  sk   € ô( 	�4œÔÜ�E˜$˜Ð!2Ð3Ó4Ð4ä�Ô!ÜÐ$ _Ð$7Ð7HÐIÓJÐJàÔ Ñ ©Ü˜tÔ%9¸$Ñ%?Ó@Ð@à-Ô�dÒr$   c                   óŠ   ‡ — e Zd ZdZdedeegef   ddfˆ fd„Ze	defd„«       Z
e	defd„«       Ze	deegef   fd	„«       Zˆ xZS )
r•   z|
	The :exc:`AlreadyRegisteredError` exception is raised when a pattern
	factory is registered under a name already in use.
	ra   r’   r   Nc                 ó.   •— t         t        | �  ||«       y)zÜ
		Initializes the :exc:`AlreadyRegisteredError` instance.

		*name* (:class:`str`) is the name of the registered pattern.

		*pattern_factory* (:class:`~collections.abc.Callable`) is the
		registered pattern factory.
		N)Úsuperr•   Ú__init__)Úselfra   r’   Ú	__class__s      €r"   rš   zAlreadyRegisteredError.__init__  s   ø€ ô Ô Ñ.¨t°_ÕEr$   c                 óP   — dj                  | j                  | j                  ¬«      S )ú4
		*message* (:class:`str`) is the error message.
		zG{name!r} is already registered for pattern factory:{pattern_factory!r}.)ra   r’   )Úformatra   r’   ©r›   s    r"   ÚmessagezAlreadyRegisteredError.message   s.   € ð
 
S×	YÑ	YØ�	‰	Ø×'Ñ'ð 
Zó 
ð r$   c                 ó    — | j                   d   S )zB
		*name* (:class:`str`) is the name of the registered pattern.
		r   ©Úargsr    s    r"   ra   zAlreadyRegisteredError.name*  s   € ð
 
�‰�1‰Ðr$   c                 ó    — | j                   d   S )za
		*pattern_factory* (:class:`~collections.abc.Callable`) is the
		registered pattern factory.
		r   r£   r    s    r"   r’   z&AlreadyRegisteredError.pattern_factory1  ó   € ð 
�‰�1‰Ðr$   )r€   Ú
__module__Ú__qualname__Ú__doc__r   r	   r   r   rš   Úpropertyr¡   ra   r’   Ú__classcell__©rœ   s   @r"   r•   r•     s–   ø„ ñð
FàðFð ˜V˜H gÐ-Ñ.ðFð õ	Fð ð�cò ó ðð ð�3ò ó ðð ð˜h¨ x°Ð'8Ñ9ò ó ôr$   r•   c                   óŒ   ‡ — e Zd ZdZdedededdfˆ fd„Zedefd„«       Zedefd	„«       Zedefd
„«       Z	edefd„«       Z
ˆ xZS )r_   zN
	The :exc:`RecursionError` exception is raised when recursion is
	detected.
	rY   rZ   r[   r   Nc                 ó0   •— t         t        | �  |||«       y)a+  
		Initializes the :exc:`RecursionError` instance.

		*real_path* (:class:`str`) is the real path that recursion was
		encountered on.

		*first_path* (:class:`str`) is the first path encountered for
		*real_path*.

		*second_path* (:class:`str`) is the second path encountered for
		*real_path*.
		N)r™   r_   rš   )r›   rY   rZ   r[   rœ   s       €r"   rš   zRecursionError.__init__@  s   ø€ ô$ Œ˜Ñ& y°*¸kÕJr$   c                 ó    — | j                   d   S )zx
		*first_path* (:class:`str`) is the first path encountered for
		:attr:`self.real_path <RecursionError.real_path>`.
		r   r£   r    s    r"   rZ   zRecursionError.first_pathT  r¦   r$   c                 óf   — dj                  | j                  | j                  | j                  ¬«      S )rž   zDReal path {real!r} was encountered at {first!r} and then {second!r}.)ÚrealÚfirstÚsecond)rŸ   rY   rZ   r[   r    s    r"   r¡   zRecursionError.message\  s5   € ð
 
P×	VÑ	VØ�‰Ø	�‰Ø
×
Ñ
ð 
Wó 
ð r$   c                 ó    — | j                   d   S )zV
		*real_path* (:class:`str`) is the real path that recursion was
		encountered on.
		r   r£   r    s    r"   rY   zRecursionError.real_pathg  r¦   r$   c                 ó    — | j                   d   S )zz
		*second_path* (:class:`str`) is the second path encountered for
		:attr:`self.real_path <RecursionError.real_path>`.
		rs   r£   r    s    r"   r[   zRecursionError.second_patho  r¦   r$   )r€   r§   r¨   r©   r   rš   rª   rZ   r¡   rY   r[   r«   r¬   s   @r"   r_   r_   :  s¤   ø„ ñð
KàðKð ðKð ð	Kð
 õKð( ð˜ò ó ðð ð�cò ó ðð ð˜ò ó ðð ð˜#ò ó ôr$   r_   T)Úfrozenc                   óD   — e Zd ZU dZdZeed<   	 ee   ed<   	 ee	   ed<   y)ÚCheckResultze
	The :class:`CheckResult` class contains information about the file and which
	pattern matched it.
	)r&   r)   r-   r&   r)   r-   N)
r€   r§   r¨   r©   Ú	__slots__r   Ú__annotations__r   ÚboolÚint© r$   r"   r¸   r¸   x  s<   … ñð€ð ƒðð �4‰.Óðð
 	�‰Óðr$   r¸   c                   ó*   — e Zd ZdZdZdee   ddfd„Zy)r2   z>
	The :class:`.MatchDetail` class contains information about
	©r%   r%   r   Nc                 ó   — || _         y)zá
		Initialize the :class:`.MatchDetail` instance.

		*patterns* (:class:`~collections.abc.Sequence` of :class:`~pathspec.pattern.Pattern`)
		contains the patterns that matched the file in the order they were
		encountered.
		Nr¿   )r›   r%   s     r"   rš   zMatchDetail.__init__   s   € ð €$„-ðr$   )r€   r§   r¨   r©   r¹   r   r   rš   r½   r$   r"   r2   r2   ˜  s&   „ ñð
 €ð˜h wÑ/ð °Dô r$   c            
       óÀ   — e Zd ZdZdZdededej                  dej                  ddf
d	„Zdd
e	e
   de
fd„Zdd
e	e
   de
fd„Zde
fd„Zdd
e	e
   dej                  fd„Zy)rK   zR
	The :class:`.TreeEntry` class contains information about a file-system
	entry.
	©Ú_lstatra   r   Ú_statra   r   Úlstatrb   r   Nc                 óB   — || _         	 || _        	 || _        	 || _        y)aP  
		Initialize the :class:`.TreeEntry` instance.

		*name* (:class:`str`) is the base name of the entry.

		*path* (:class:`str`) is the relative path of the entry.

		*lstat* (:class:`os.stat_result`) is the stat result of the direct
		entry.

		*stat* (:class:`os.stat_result`) is the stat result of the entry,
		potentially linked.
		NrÂ   )r›   ra   r   rÅ   rb   s        r"   rš   zTreeEntry.__init__º  s:   € ð* !&€$„+ðð
 €$„)ðð €$„)ðð  $€$„*ðr$   rJ   c                 ó|   — |€d}|r| j                   n| j                  }t        j                  |j                  «      S )a<  
		Get whether the entry is a directory.

		*follow_links* (:class:`bool` or :data:`None`) is whether to follow
		symbolic links. If this is :data:`True`, a symlink to a directory
		will result in :data:`True`. Default is :data:`None` for :data:`True`.

		Returns whether the entry is a directory (:class:`bool`).
		T)rÄ   rÃ   rb   ÚS_ISDIRÚst_mode©r›   rJ   rm   s      r"   r   zTreeEntry.is_dirå  ó5   € ð ÐØ€<á(ˆd�jŠj¨d¯k©k€)Ü	�‰�i×'Ñ'Ó	(Ð(r$   c                 ó|   — |€d}|r| j                   n| j                  }t        j                  |j                  «      S )aE  
		Get whether the entry is a regular file.

		*follow_links* (:class:`bool` or :data:`None`) is whether to follow
		symbolic links. If this is :data:`True`, a symlink to a regular file
		will result in :data:`True`. Default is :data:`None` for :data:`True`.

		Returns whether the entry is a regular file (:class:`bool`).
		T)rÄ   rÃ   rb   ÚS_ISREGrÉ   rÊ   s      r"   re   zTreeEntry.is_fileõ  rË   r$   c                 óT   — t        j                  | j                  j                  «      S )zC
		Returns whether the entry is a symbolic link (:class:`bool`).
		)rb   ÚS_ISLNKrÃ   rÉ   r    s    r"   rd   zTreeEntry.is_symlink  s   € ô 
�‰�d—k‘k×)Ñ)Ó	*Ð*r$   c                 ó>   — |€d}|r| j                   S | j                  S )a9  
		Get the cached stat result for the entry.

		*follow_links* (:class:`bool` or :data:`None`) is whether to follow
		symbolic links. If this is :data:`True`, the stat result of the
		linked file will be returned. Default is :data:`None` for :data:`True`.

		Returns that stat result (:class:`os.stat_result`).
		T)rÄ   rÃ   )r›   rJ   s     r"   rb   zTreeEntry.stat  s$   € ð ÐØ€<á#ˆ�‰Ð4¨¯©Ð4r$   ©N)r€   r§   r¨   r©   r¹   r   r   Ústat_resultrš   r   r»   r   re   rd   rb   r½   r$   r"   rK   rK   ±  s¡   „ ñð 1€ð)àð)ð 	ð)ð 
�‰ð	)ð
 	�‰ð)ð ó)ñV) ¨¡ð )¸$ó )ñ ) ¨$¡ð )¸4ó )ð +˜ó +ñ5˜h t™nð 5¸¿¹ô 5r$   rÑ   )NN)Br©   r   Úos.pathÚpathlibr‹   rb   Úsysrv   Úcollections.abcr   r5   r   rE   Údataclassesr   r   Útypingr   r   r	   r
   r   r   r   r   r   r   r   r   r   r.   r   Úversion_infor   ÚStrPathr   r    Úaltseprˆ   r{   ÚPathr#   r¼   r»   r/   r=   rB   rG   rc   rT   rQ   rq   ry   r|   r*   r„   rŽ   r‘   r–   Ú	Exceptionr•   r_   r¸   Úobjectr2   rK   )Ú__seps   0r"   ú<module>rà      s&  ðñó 
Û Û Û Û Û 
Û ÷õõ÷÷ ÷ ÷ ñ õ"
ð ×Ñ�vÒØ��h˜s‘mÐ#Ñ$�à��h�Ñ€á�: WÔ-€ðð �v‰v�r—y‘yÐ!öà
Ù	ˆe�y—}‘}Ò$ò òÐ ð
ð Ð ðð˜Ÿ™ð ¨#ó ð$Ø�E˜#˜w˜,Ñ'Ñ(ðà
ðð ˆ8�D‰>˜8 C™=Ð(Ñ)óð>  $ñ+Ø�GÑð+à�‰ð+ð �t‰nð+ð 
ˆ#ˆ}Ð
Ñó	+ð\Ø�GÑðà	ˆ%��W�Ñ
Ñóð(P˜ð P ó Pð 26Ø $ñ [Øð [à�H˜g˜Y¨˜_Ñ-Ñ.ð [ð ˜‰~ð [ð ˆkÑó	 [ðFNØðNà
ðNð ˆC�ˆH�~ðNð �W�I˜t�OÑ$ð	Nð
 ðNð ˆkÑóNðf 26Ø $ñØðà�H˜g˜Y¨˜_Ñ-Ñ.ðð ˜‰~ðð ˆc�]ó	ó>Lð	#˜ð 	# ¨6¨(°GÐ*;Ñ!<ó 	#ð˜ 'Ñ*ð °#ð ¸$ó ð(Ø�GÑðà�‰ðð 	ˆ�XóðF *.ñ%Øð%à�j ‘oÑ&ð%ð 	ó%ðT *.ñ"Ø�Ñð"à�j ‘oÑ&ð"ð 
ˆ#ˆt�G‰}Ð
Ñó"ðP !ñ.Ø
ð.à˜F˜8 WÐ,Ñ-ð.ð �D‰>ð.ð 
ó	.ô@,˜Yô ,ô^;�Yô ;ñ| �$Ôô�'˜(Ñ#ó ó ðô>�&ô ô2g5�õ g5ùòAs   Â!I