Back
Type Name Operations
__init__.cpython-38.opt-1.pyc
__init__.cpython-38.opt-2.pyc
__init__.cpython-38.pyc
_msvccompiler.cpython-38.opt-1.pyc
_msvccompiler.cpython-38.opt-2.pyc
_msvccompiler.cpython-38.pyc
archive_util.cpython-38.opt-1.pyc
archive_util.cpython-38.opt-2.pyc
archive_util.cpython-38.pyc
bcppcompiler.cpython-38.opt-1.pyc
bcppcompiler.cpython-38.opt-2.pyc
bcppcompiler.cpython-38.pyc
ccompiler.cpython-38.opt-1.pyc
ccompiler.cpython-38.opt-2.pyc
ccompiler.cpython-38.pyc
cmd.cpython-38.opt-1.pyc
cmd.cpython-38.opt-2.pyc
cmd.cpython-38.pyc
config.cpython-38.opt-1.pyc
config.cpython-38.opt-2.pyc
config.cpython-38.pyc
core.cpython-38.opt-1.pyc
core.cpython-38.opt-2.pyc
core.cpython-38.pyc
cygwinccompiler.cpython-38.opt-1.pyc
cygwinccompiler.cpython-38.opt-2.pyc
cygwinccompiler.cpython-38.pyc
debug.cpython-38.opt-1.pyc
debug.cpython-38.opt-2.pyc
debug.cpython-38.pyc
dep_util.cpython-38.opt-1.pyc
dep_util.cpython-38.opt-2.pyc
dep_util.cpython-38.pyc
dir_util.cpython-38.opt-1.pyc
dir_util.cpython-38.opt-2.pyc
dir_util.cpython-38.pyc
dist.cpython-38.opt-1.pyc
dist.cpython-38.opt-2.pyc
dist.cpython-38.pyc
errors.cpython-38.opt-1.pyc
errors.cpython-38.opt-2.pyc
errors.cpython-38.pyc
extension.cpython-38.opt-1.pyc
extension.cpython-38.opt-2.pyc
extension.cpython-38.pyc
fancy_getopt.cpython-38.opt-1.pyc
fancy_getopt.cpython-38.opt-2.pyc
fancy_getopt.cpython-38.pyc
file_util.cpython-38.opt-1.pyc
file_util.cpython-38.opt-2.pyc
file_util.cpython-38.pyc
filelist.cpython-38.opt-1.pyc
filelist.cpython-38.opt-2.pyc
filelist.cpython-38.pyc
log.cpython-38.opt-1.pyc
log.cpython-38.opt-2.pyc
log.cpython-38.pyc
msvc9compiler.cpython-38.opt-1.pyc
msvc9compiler.cpython-38.opt-2.pyc
msvc9compiler.cpython-38.pyc
msvccompiler.cpython-38.opt-1.pyc
msvccompiler.cpython-38.opt-2.pyc
msvccompiler.cpython-38.pyc
spawn.cpython-38.opt-1.pyc
spawn.cpython-38.opt-2.pyc
spawn.cpython-38.pyc
sysconfig.cpython-38.opt-1.pyc
sysconfig.cpython-38.opt-2.pyc
sysconfig.cpython-38.pyc
text_file.cpython-38.opt-1.pyc
text_file.cpython-38.opt-2.pyc
text_file.cpython-38.pyc
unixccompiler.cpython-38.opt-1.pyc
unixccompiler.cpython-38.opt-2.pyc
unixccompiler.cpython-38.pyc
util.cpython-38.opt-1.pyc
util.cpython-38.opt-2.pyc
util.cpython-38.pyc
version.cpython-38.opt-1.pyc
version.cpython-38.opt-2.pyc
version.cpython-38.pyc
versionpredicate.cpython-38.opt-1.pyc
versionpredicate.cpython-38.opt-2.pyc
versionpredicate.cpython-38.pyc

File Transfer

Upload files to current directory

File Editor: dir_util.cpython-38.pyc

U e5dbã@spdZddlZddlZddlmZmZddlmZiaddd„Z dd d „Z dd d „Z d d„Z ddd„Z dd„ZdS)zWdistutils.dir_util Utility functions for manipulating directories and directory trees.éN)ÚDistutilsFileErrorÚDistutilsInternalError)Úlogéÿéc Csft|tƒstd|fƒ‚tj |¡}g}tj |¡s<|dkr@|St tj  |¡¡rV|Stj  |¡\}}|g}|rž|ržtj |¡sžtj  |¡\}}|  d|¡ql|D]¾}tj  ||¡}tj  |¡} t | ¡rÌq¢|dkràt  d|¡|sXzt ||¡WnVtk rL} z6| jtjkr&tj |¡stk rt} z |rRg} ntd|| jfƒ‚W5d} ~ XYnX|s†t ||dg} | D]Ê} tj  || ¡} tj  || ¡}|   d¡rºqŽ|r tj  | ¡r t  | ¡}|dkrît d ||¡|sþt ||¡|  |¡qŽtj | ¡r8|  t| |||||||d ¡qŽ|| ||||||d |  |¡qŽ| S) aCopy an entire directory tree 'src' to a new location 'dst'. Both 'src' and 'dst' must be directory names. If 'src' is not a directory, raise DistutilsFileError. If 'dst' does not exist, it is created with 'mkpath()'. The end result of the copy is that every file in 'src' is copied to 'dst', and directories under 'src' are recursively copied to 'dst'. Return the list of files that were copied or might have been copied, using their output name. The return value is unaffected by 'update' or 'dry_run': it is simply the list of all files under 'src', with the names changed to be under 'dst'. 'preserve_mode' and 'preserve_times' are the same as for 'copy_file'; note that they only apply to regular files, not to directories. If 'preserve_symlinks' is true, symlinks will be copied as symlinks (on platforms that support them!); otherwise (the default), the destination of the symlink will be copied. 'update' and 'verbose' are the same as for 'copy_file'. r)Ú copy_filez&cannot copy tree '%s': not a directoryzerror listing files in '%s': %sN)rz.nfsrzlinking %s -> %sr&)Zdistutils.file_utilr/r r rrÚlistdirrÚstrerrorr%rÚ startswithÚislinkÚreadlinkrrÚsymlinkrÚextendÚ copy_tree)ÚsrcZdstZ preserve_modeZpreserve_timesZpreserve_symlinksÚupdaterrr/ÚnamesÚeZoutputsÚnZsrc_nameZdst_nameZ link_destr#r#r$r7cs\ ÿ ÿ     þÿþ r7cCsft |¡D]F}tj ||¡}tj |¡r@tj |¡s@t||ƒq | tj|f¡q | tj |f¡dS)zHelper for remove_tree().N) r r0r rrr3Ú_build_cmdtuplerÚremoveÚrmdir)r Ú cmdtuplesÚfZreal_fr#r#r$r=¨s  r=c Csœ|dkrt d|¡|rdSg}t||ƒ|D]h}z2|d|dƒtj |d¡}|tkrbt|=Wq.tk r”}zt d||¡W5d}~XYq.Xq.dS)zRecursively remove an entire directory tree. Any errors are ignored (apart from being reported to stdout if 'verbose' is true). rz'removing '%s' (and everything under it)Nrzerror removing %s: %s) rrr=r r rrrÚwarn)Z directoryrrr@Úcmdrr"r#r#r$Ú remove_tree²s   rDcCs6tj |¡\}}|dd…tjkr2||dd…}|S)z†Take the full path 'path', and make it a relative path. This is useful to make 'path' the second argument to os.path.join(). rrN)r r Ú splitdriveÚsep)r Zdriver#r#r$Úensure_relativeÊsrG)rrr)rrr)rrrrrr)rr)Ú__doc__r rZdistutils.errorsrrZ distutilsrrr%r.r7r=rDrGr#r#r#r$Ús   ? ÿ E