/usr/bin/env python
# coding=utf-8
__author__ = 'zhuo'
__date__ = '2017/5/25'
# shutil_demo.py 高级文件操作...(src, dst, *, follow_symlinks=True) // 拷贝文件(数据 / 权限)
dst = shutil.copy('file.txt', 'temp.txt').../目录, 目录存在则移动目录, 文件存在则覆盖
dst = shutil.move("root", "temp", copy_function=shutil.copy2)
total,...("python")
# 异常
try: pass
except shutil.SameFileError: pass # copyfile()时,源和目录是同一个文件时,...抛此异常
except shutil.Error: pass # copytree()时, 多文件操作时引发的异常, 异常包含(srcname, dstname, excinfo)