tzh
2024-08-22 c7d0944258c7d0943aa7b2211498fd612971ce27
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
[\¬Qc@s–dZdZddlZddlmZddlmZidd6dd6d    d
6Zdd „Z    ddddddd„Z
ddd„Z d„Z dS(sFdistutils.file_util
 
Utility functions for operating on single files.
s$Id$iÿÿÿÿN(tDistutilsFileError(tlogtcopyings hard linkingthardssymbolically linkingtsymiicCsÇd}d}zyt|dƒ}Wn2tjk
rV\}}td||fƒ‚nXtjj|ƒr²ytj|ƒWq²tjk
r®\}}td||fƒ‚q²Xnyt|dƒ}Wn2tjk
rù\}}td||fƒ‚nXx›y|j|ƒ}Wn2tjk
rD\}}td||fƒ‚nX|sOPny|j    |ƒWqýtjk
r”\}}td||fƒ‚qýXqýWd|r¯|j
ƒn|rÂ|j
ƒnXdS(    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': %sscould not read from '%s': %sscould not write to '%s': %sN( tNonetopentosterrorRtpathtexiststunlinktreadtwritetclose(tsrctdstt buffer_sizetfsrctfdstterrnoterrstrtbuf((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/file_util.pyt_copy_file_contentssF
 iicCs™ddlm}ddlm}    m}
m} m} tjj    |ƒsWt
d|ƒ‚ntjj |ƒr“|} tjj |tjj |ƒƒ}ntjj|ƒ} |rä|||ƒ rä|dkrÚtjd|ƒn|dfSyt|}Wn!tk
rtd|ƒ‚nX|dkrxtjj |ƒtjj |ƒkr_tjd    ||| ƒqxtjd    |||ƒn|rˆ|dfS|d
krÑtjj|ƒo¸tjj||ƒstj||ƒqn¾|d krtjj|ƒotjj||ƒstj||ƒqnut||ƒ|s3|rtj|ƒ}|ritj|||    ||
fƒn|rtj|| || ƒƒ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).
    iÿÿÿÿ(tnewer(tST_ATIMEtST_MTIMEtST_MODEtS_IMODEs4can't copy '%s': doesn't exist or not a regular fileis"not copying %s (output up-to-date)is&invalid value '%s' for 'link' arguments %s %s -> %sRR(tdistutils.dep_utilRtstatRRRRR    R tisfileRtisdirtjointbasenametdirnameRtdebugt _copy_actiontKeyErrort
ValueErrortinfoR tsamefiletlinktsymlinkRtutimetchmod(RRt preserve_modetpreserve_timestupdateR,tverbosetdry_runRRRRRtdirtactiontst((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/file_util.pyt    copy_fileGsJ!"$ 
  $
 ' '  ! c Csûddlm}m}m}m}m}ddl}    |dkrVtjd||ƒn|r`|S||ƒst    d|ƒ‚n||ƒr©t
j j |||ƒƒ}n%||ƒrÎt    d||fƒ‚n|||ƒƒsùt    d||fƒ‚nd    }
yt
j ||ƒWnMt
jk
rb\} } | |    jkrFd}
qct    d
||| fƒ‚nX|
r÷t||d |ƒyt
j|ƒWq÷t
jk
ró\} } yt
j|ƒWnt
jk
rÏnXt    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???
    iÿÿÿÿ(R R!R"R$R%Nismoving %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 pathiscouldn't move '%s' to '%s': %sR3s+couldn't move '%s' to '%s' by copy/delete: sdelete '%s' failed: %s(tos.pathR R!R"R$R%RRR*RR    R R#trenameR
tEXDEVR8R ( RRR3R4R R!R"R$R%Rtcopy_ittnumtmsg((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/file_util.pyt    move_file¢sP
(         cCsGt|dƒ}z&x|D]}|j|dƒqWWd|jƒXdS(s{Create a file with the specified name and write 'contents' (a
    sequence of strings without line terminators) to it.
    tws
N(RRR(tfilenametcontentstftline((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/file_util.pyt
write_fileÞs
 i@( t__doc__t __revision__R    tdistutils.errorsRt    distutilsRRR'RR8R?RE(((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/file_util.pyt<module>s 
 
 5    Z<