File I/O improvements

- Tracer now iterates over blocks in disk order.
- Packer copies files per directory, in a separate thread.
- Packer only copies files if they don't exist yet.
- Packer also copies file permissions.
This commit is contained in:
Sybren A. Stüvel
2018-03-08 12:33:15 +01:00
parent b5418e1f5f
commit 08f538d8c8
3 changed files with 96 additions and 14 deletions
+7 -1
View File
@@ -33,7 +33,13 @@ def cli_pack(args):
bpath, ppath, tpath = paths_from_cli(args)
packer = pack.Packer(bpath, ppath, tpath, args.noop)
packer.strategise()
packer.execute()
try:
packer.execute()
except pack.FileCopyError as ex:
log.error("%d files couldn't be copied, starting with %s",
len(ex.files_not_copied), ex.files_not_copied[0])
raise SystemExit(1)
def paths_from_cli(args) -> (pathlib.Path, pathlib.Path, pathlib.Path):