_files
_files
¶
Read bounded workload files without following links or waiting on devices.
MAX_RESULT_BYTES = 1024 * 1024
module-attribute
¶
slot_output_dir(workspace, slot)
¶
read_regular(path, limit=MAX_RESULT_BYTES)
¶
Read a small regular UTF-8 file; reject symlinks in every path component.
Raises:
| Type | Description |
|---|---|
OSError
|
The path is absent, linked, special, or exceeds the size limit. |
UnicodeError
|
The file is not UTF-8. |