
    ^h0                     R    S SK r S SKr\ R                  S 5       rSS jrSS jrS rg)    Nc              #      #    [         R                  " 5       n[         R                  " U 5         Uv   [         R                  " U5        g! [         R                  " U5        f = f7f)z9A context manager for operating in a different directory.N)osgetcwdchdir)dirnameorigs     Q/home/james-whalen/.local/lib/python3.13/site-packages/debugpy/_vendored/_util.pycwdr
   	   s>      99;DHHW

s   ,A%A
 A%
A""A%c              #      #    U /nU(       a2  UR                  S5      n[        XCX5       H  nUv   M	     U(       a  M1  gg7f)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   results         r	   iter_all_filesr      s<      fG
++a.!'ILFL M 's
   :A A c              #      #    U /nU(       aJ  UR                  S5      n/ n[        XCX5       H  u  pgnUR                  Xx45        M     XE4v   U(       a  MI  gg7f)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fs	            r	   	iter_treer   !   sV      fG
++a."7YMGA!LL!  Nn 's   AAAc              #   F  #    [         R                  " U 5       H  n[         R                  R                  X5      n[         R                  R	                  U5      (       a%  Ub  U" X5      (       a  MX  UR                  U5        Mk  Ub  U" X5      (       a  M}  XU4v   M     g 7f)N)r   listdirpathjoinisdirr   )r   subdirsr   r   basenamefilenames         r	   r   r   0   s|     JJw'77<<277==""$7)E)ENN8$ 'L,K,KX-- (s   BB!)NN)
contextlibr   contextmanagerr
   r   r   r        r	   <module>r'      s6   
  	  
.r&   