(input, output)
| 107 | @click.argument("input", type=click.File("rb")) |
| 108 | @click.argument("output", type=click.File("wb")) |
| 109 | def inout(input, output): |
| 110 | while True: |
| 111 | chunk = input.read(1024) |
| 112 | if not chunk: |
| 113 | break |
| 114 | output.write(chunk) |
| 115 | |
| 116 | with runner.isolated_filesystem(): |
| 117 | result = runner.invoke(inout, ["-", "hello.txt"], input="Hey!") |