def _relative_move(srcroot, srcrel, destroot):
''' Move a file relative to a given root to a given destination.
E.g. relative_move('foo/', 'bar/baz', 'bob/') will move
foo/bar/baz into bob/bar/baz, creating bob/bar if needed.
'''
srcfile = srcroot / srcrel
destfile = destroot / srcrel
utils.mkdir(destfile.parent) # make sure directory exists
shutil.move(str(srcfile), str(destfile))
评论列表
文章目录