
    g                     f    d dl Z d dlZd dlZd Zej                  j                  dd      d        Zy)    Nc                 8   | j                  d      }|j                  d       | j                  d      }t        j                  d      }t	        j
                  t              5  |j                  t        |      t        |             d d d        y # 1 sw Y   y xY w)Nsource_file.txtcontentz+non_existent_directory/destination_file.txtfile)	joinwritefsspec
filesystempytestraisesFileNotFoundErrormvstr)tmpdirsourcedestinationfss       M/var/www/openai/venv/lib/python3.12/site-packages/fsspec/tests/abstract/mv.py"test_move_raises_error_with_tmpdirr      sr    [[*+F
LL ++KLK 
		6	"B 
(	)
c&k3{+, 
*	)	)s   "%BB	recursive)TFc                    |j                  d      }|j                  d       |j                  d      }t        |      }t        j
                  dk(  rt	        j                  d| d       nt	        j                  |d       |j                  d      }t        j                  d	      }t        j                  t              5  |j                  t        |      t        |      | 
       d d d        t        j                  j                  |      rJ t        j
                  dk(  rt	        j                  d| d       y t	        j                  |d       y # 1 sw Y   nxY w)Nr   r   protected_directoryntzicacls "z" /deny Everyone:(W)im  zdestination_file.txtr   )r   z" /remove:d Everyonei  )r   r   mkdirr   osnamesystemchmodr	   r
   r   r   PermissionErrorr   pathexists)r   r   r   protected_dirprotected_pathr   r   s          r   -test_move_raises_error_with_tmpdir_permissionr$      s    [[*+F
LL LL!67M'N 
ww$
		H^,,@AB
'  $$%;<K 
		6	"B 
	'
c&k3{+yA 
( ww~~k*** 
ww$
		H^,,@AB
' 
(	's   'EE)r   r   r	   r   markparametrizer$        r   <module>r)      s8    	  -  m4 ( 5 (r(   