files
ensure_path(pathIn, caller)
Utility function for other functions to make sure a path was passed to them.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pathIn
|
PathLike
|
Supposed passed Path |
required |
caller
|
Any
|
Caller name used for the exception and error message |
required |
Source code in .venv/lib/python3.11/site-packages/muxtools/utils/files.py
ensure_path_exists(pathIn, caller, allow_dir=False)
Utility function for other functions to make sure a path was passed to them and that it exists.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pathIn
|
PathLike | list[PathLike] | GlobSearch
|
Supposed passed Path |
required |
caller
|
Any
|
Caller name used for the exception and error message |
required |
Source code in .venv/lib/python3.11/site-packages/muxtools/utils/files.py
get_crc32(file)
Generates crc32 checksum for file
Parameters:
Name | Type | Description | Default |
---|---|---|---|
file
|
PathLike
|
Input file |
required |
Returns:
Type | Description |
---|---|
str
|
Checksum for file |
Source code in .venv/lib/python3.11/site-packages/muxtools/utils/files.py
uniquify_path(path)
Extends path to not conflict with existing files
Parameters:
Name | Type | Description | Default |
---|---|---|---|
file
|
Input file |
required |
Returns:
Type | Description |
---|---|
str
|
Unique path |