data
data
Data files for CCBR actions
Functions
Name | Description |
---|---|
get_file_path | Get the file path for a given filename within the package. |
get_file_path
data.get_file_path(filename)
Get the file path for a given filename within the package.
This function retrieves the path to a specified file within the package’s data files using the importlib.resources
module.
Parameters
Name | Type | Description | Default |
---|---|---|---|
filename | str | The name of the file for which to retrieve the path. | required |
Returns
Name | Type | Description |
---|---|---|
pathlib.Path: The path to the specified file within the package. |
Raises
Name | Type | Description |
---|---|---|
FileNotFoundError | If the specified file is not found within the package data. |
Examples
>>> get_file_path('tool_version_commands.json')
'/path/to/package/tool_version_commands.json') PosixPath(