
    c                     6    d Z ddlmZmZ ddlZddlZd Zd ZdS )z&Internal file and directory utilities.    )absolute_importprint_functionNc                     t           j                            |           } t           j                            |          }fd | |          S )z2Test whether child is somewhere underneath parent.c                     t           j                            |          }|| k    rdS t          |          t          |           k     rdS  | |          S )NTF)ospathdirnamelen)real_parent
real_childr	   _helpers      Llib/python3.11/site-packages/anaconda_project/internal/directory_contains.pyr   z0directory_contains_subdirectory.<locals>._helper   sZ    '//*--k! 	14\\C,,, 	157;000    )r   r   realpath)parentchildr   s     @r   directory_contains_subdirectoryr      sZ    Wf%%FGU##E
1 1 1 1 1 765!!!r   c                    t           j                            |          }t           j                            |           } t          ||           s| S |                     |          sJ | t          |          d         } |                     d          r
| dd         } t          j                    dk    r|                     d          r
| dd         } | S )z4Make subdirectory name relative to the given parent.N/   Windows\)r   r   r   r   
startswithr
   platformsystem)r   r   s     r   "subdirectory_relative_to_directoryr   #   s    Wf%%FGU##E*6599 F######f++,,E abb	I% %*:*:4*@*@ abb	Lr   )__doc__
__future__r   r   r   r   r   r    r   r   <module>r       s_    - , 6 6 6 6 6 6 6 6 				 " " "(    r   