o
    Mh                     @   sN   d dl Z e jde je jddZe jedZdd Zda	dd	 Z
dS )
    N
PLOTLY_DIR~z.plotlyz.permission_testc                  C   s   zMt jtszt t W n ty   t jts Y nw ttd} | 	d W d    n1 s4w   Y  z	t 
t W W dS  tyM   Y W dS w  tyW   Y dS w )Nwztesting
TF)ospathexistsr   mkdir	Exceptionisdiropen	TEST_FILEwriteremove)f r   T/var/www/html/Persson_Maskin/env/lib/python3.10/site-packages/_plotly_utils/files.py_permissions	   s,   r   c                   C   s   t d u rt a t S )N)_file_permissionsr   r   r   r   r   ensure_writable_plotly_dir    s   r   )r   environgetr   join
expanduserr   r   r   r   r   r   r   r   r   <module>   s    