a
´iÔ ã @ sZ d Z ddlZddlmZ ddlmZ ddddœZdd
d„Zdd
d„Zddd„Z dd„ Z
dS )zFdistutils.file_util
Utility functions for operating on single files.
é N)ÚDistutilsFileError)ÚlogZcopyingzhard linkingzsymbolically linking)NÚhardÚsymé @ c
C sÈ d}d}�zšzt | dƒ}W n6 tyP } ztd| |jf ƒ‚W Y d}~n
d}~0 0 tj |¡r¤zt |¡ W n6 ty¢ } ztd||jf ƒ‚W Y d}~n
d}~0 0 zt |dƒ}W n6 tyè } ztd||jf ƒ‚W Y d}~n
d}~0 0 z| |¡}W n8 t�y0 } ztd| |jf ƒ‚W Y d}~n
d}~0 0 |�s<�q†z| |¡ W qê t�y‚ } ztd||jf ƒ‚W Y d}~qêd}~0 0 qêW |�r–|
¡ |�rÄ|
¡ n|�r´|
¡ |�rÂ|
¡ 0 dS ) a5 Copy the file 'src' to 'dst'; both must be filenames. Any error
opening either file, reading from 'src', or writing to 'dst', raises
DistutilsFileError. Data is read/written in chunks of 'buffer_size'
bytes (default 16k). No attempt is made to handle anything apart from
regular files.
NÚrbzcould not open '%s': %szcould not delete '%s': %sÚwbzcould not create '%s': %szcould not read from '%s': %szcould not write to '%s': %s)ÚopenÚOSErrorr ÚstrerrorÚosÚpathÚexistsÚunlinkÚreadÚwriteÚclose)ÚsrcÚdstZbuffer_sizeÚfsrcÚfdstÚeÚbuf© r ú+/usr/lib64/python3.9/distutils/file_util.pyÚ_copy_file_contents sT (ÿÿÿÿ
ýr é c C s
ddl m} ddlm} m}
m}m} tj | ¡s