hscommon.path¶
- hscommon.path.log_io_error(func)¶
Catches OSError, IOError and WindowsError and log them
- hscommon.path.pathify(f)¶
Ensure that every annotated
Patharguments are actually paths.When a function is decorated with
@pathify, every argument with annotated as Path will be converted to a Path if it wasn’t already. Example:@pathify def foo(path: Path, otherarg): return path.listdir()
Calling
foo('/bar', 0)will convert'/bar'toPath('/bar').