KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /usr/lib64/python2.4/distutils/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib64/python2.4/distutils/file_util.pyc
mò
‚=5Dc@s—dZdZdkZdklZdklZhdd<dd<dd	<Zd
dd„Z	d
d
ddddd„Z
ddd„Zd„ZdS(sFdistutils.file_util

Utility functions for operating on single files.
s5$Id: file_util.py 37828 2004-11-10 22:23:15Z loewis $N(sDistutilsFileError(slogtcopyingthardshard linkingtsymssymbolically linkingiicCsÌd	}d	}zŽyt|dƒ}Wn1tij
o"\}}t	d||f‚nXti
i|ƒoIyti
|ƒWq²tij
o"\}}t	d||f‚q²Xnyt|dƒ}Wn1tij
o"\}}t	d||f‚nXxy|i|ƒ}Wn1tij
o"\}}t	d||f‚nX|pPny|i|ƒWqütij
o"\}}t	d||f‚qüXqüWWd	|o|iƒn|o|iƒnXd	S(
s5Copy 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.
    trbscould not open '%s': %sscould not delete '%s': %stwbscould not create '%s': %siscould not read from '%s': %sscould not write to '%s': %sN(tNonetfsrctfdsttopentsrctosterrorterrnoterrstrtDistutilsFileErrortpathtexiststdsttunlinktreadtbuffer_sizetbuftwritetclose(R	RRRRRRR
((t+/usr/lib64/python2.4/distutils/file_util.pyt_copy_file_contentssD!iicCsÿdkl}
dkl}
l}l}l}	tii	|ƒptd|‚ntii|ƒo+|}tii|tii|ƒƒ}ntii|ƒ}|o/|
||ƒotid|ƒ|dfSnyt|}Wn tj
otd|‚nXtii|ƒtii|ƒjotid|||ƒntid|||ƒ|o|dfSntid	jo\d
k}y|i||d|ƒWqõti j
o#}td|||df‚qõXn|d
joAtii"|ƒotii#||ƒpti||ƒqõnË|djoAtii"|ƒotii#||ƒpti$||ƒqõn}t%||ƒ|p|oati|ƒ}|o"ti(|||
||fƒn|oti)||	||ƒƒqõn|dfS(sáCopy a file 'src' to 'dst'.  If 'dst' is a directory, then 'src' is
    copied there with the same name; otherwise, it must be a filename.  (If
    the file exists, it will be ruthlessly clobbered.)  If 'preserve_mode'
    is true (the default), the file's mode (type and permission bits, or
    whatever is analogous on the current platform) is copied.  If
    'preserve_times' is true (the default), the last-modified and
    last-access times are copied as well.  If 'update' is true, 'src' will
    only be copied if 'dst' does not exist, or if 'dst' does exist but is
    older than 'src'.

    'link' allows you to make hard links (os.link) or symbolic links
    (os.symlink) instead of copying: set it to "hard" or "sym"; if it is
    None (the default), files are copied.  Don't set 'link' on systems that
    don't support it: 'copy_file()' doesn't check if hard or symbolic
    linking is available.

    Under Mac OS, uses the native file copy function in macostools; on
    other systems, uses '_copy_file_contents()' to copy file contents.

    Return a tuple (dest_name, copied): 'dest_name' is the actual name of
    the output file, and 'copied' is true if the file was copied (or would
    have been copied, if 'dry_run' true).
    (snewer(sST_ATIMEsST_MTIMEsST_MODEsS_IMODEs4can't copy '%s': doesn't exist or not a regular files"not copying %s (output up-to-date)is&invalid value '%s' for 'link' arguments%s %s -> %sitmacNscould not copy '%s' to '%s': %siÿÿÿÿRR(*tdistutils.dep_utiltnewertstattST_ATIMEtST_MTIMEtST_MODEtS_IMODER
RtisfileR	RtisdirRtdirtjointbasenametdirnametupdatetlogtdebugt_copy_actiontlinktactiontKeyErrort
ValueErrortinfotdry_runtnamet
macostoolstcopytpreserve_timesRtexcRtsamefiletsymlinkRt
preserve_modetsttutimetchmod(R	RR9R5R(R,tverboseR1RR!RR$R RR6R:R-R3((Rt	copy_fileLsR
%%	#
)
)
""c
Csèdkl}l}
l}l}l}	dk}tid||ƒ|o|Sn|
|ƒptd|‚n||ƒot
ii|||ƒƒ}n%||ƒotd||f‚n||	|ƒƒptd||f‚nd}yt
i||ƒWnNt
ij
o?\}}||ijo
d}qStd	|||f‚nX|oŠt||ƒyt
i|ƒWqät
ij
oV\}}yt
i|ƒWnt
ij
onXtd
d||||f‚qäXn|S(s%Move a file 'src' to 'dst'.  If 'dst' is a directory, the file will
    be moved into it with the same name; otherwise, 'src' is just renamed
    to 'dst'.  Return the new full name of the file.

    Handles cross-device moves on Unix using 'copy_file()'.  What about
    other systems???
    (sexistssisfilesisdirsbasenamesdirnameNsmoving %s -> %ss#can't move '%s': not a regular files0can't move '%s': destination '%s' already existss2can't move '%s': destination '%s' not a valid pathiiscouldn't move '%s' to '%s': %ss+couldn't move '%s' to '%s' by copy/delete: sdelete '%s' failed: %s(tos.pathRR"R#R&R'RR)R0R	RR1RR
RR%tcopy_ittrenameRtnumtmsgtEXDEVR>R(
R	RR=R1R#RRRBRCR'R"R&R@((Rt	move_file¶s@
%	




&cCs?t|dƒ}x|D]}|i|dƒqW|iƒdS(s{Create a file with the specified name and write 'contents' (a
    sequence of strings without line terminators) to it.
    tws
N(RtfilenametftcontentstlineRR(RGRIRJRH((Rt
write_fileös(
t__doc__t__revision__R
tdistutils.errorsRt	distutilsR)RR+RR>RERK(	RR)R>RMR+RKRER
R((Rt?s	

!8j@

Anon7 - 2021