(path, executable=False)
| 48 | |
| 49 | |
| 50 | def identity(path, executable=False): |
| 51 | target = Path(path).resolve(strict=True) |
| 52 | if not target.is_file() or (executable and not os.access(target, os.X_OK)): |
| 53 | raise Infrastructure("not a regular readable/executable input: " + str(target)) |
| 54 | return {"path": str(target), "sha256": digest(target), "bytes": target.stat().st_size} |
| 55 | |
| 56 | |
| 57 | class Processes: |