File: copytree.py

package info (click to toggle)
python-cloup 3.0.8-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 936 kB
  • sloc: python: 5,371; makefile: 120
file content (16 lines) | stat: -rw-r--r-- 367 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import shutil

import click
from click import argument, command


@command(no_args_is_help=True)
@argument('src', type=click.Path(exists=True))
@argument('dest', type=click.Path(file_okay=False))
def f(src: str, dest: str):
    """Copy a SRC file/folder to DEST with merging."""
    shutil.copytree(src, dest, dirs_exist_ok=True)


if __name__ == '__main__':
    f()