o
    [Zh0                     @   s>   d dl Z d dlZe jdd Zd
ddZd
ddZdd	 ZdS )    Nc              	   c   s8    t  }t |  z|V  W t | dS t | w )z9A context manager for operating in a different directory.N)osgetcwdchdir)dirnameorig r   N/var/www/html/lang_env/lib/python3.10/site-packages/debugpy/_vendored/_util.pycwd	   s   
r	   c                 c   s<    | g}|r| d}t||||D ]}|V  q|sdS dS )zYield (dirname, basename, filename) for each file in the tree.

    This is an alternative to os.walk() that flattens out the tree and
    with filtering.
    r   N)pop_iter_files)root	prune_direxclude_filependingr   resultr   r   r   iter_all_files   s   
r   c           	      c   sX    | g}|r*| d}g }t||||D ]\}}}|||f q||fV  |sdS dS )zYield (dirname, files) for each directory in the tree.

    The list of files is actually a list of (basename, filename).

    This is an alternative to os.walk() with filtering.r   N)r
   r   append)	r   r   r   r   r   files_bfr   r   r   	iter_tree!   s   

r   c                 c   sp    t | D ]/}t j| |}t j|r%|d ur|| |rq|| q|d ur/|| |r/q| ||fV  qd S )N)r   listdirpathjoinisdirr   )r   subdirsr   r   basenamefilenamer   r   r   r   0   s   r   )NN)
contextlibr   contextmanagerr	   r   r   r   r   r   r   r   <module>   s   



