filesystem
dev_tool.config.filesystem
log = logging.getLogger(__name__)
module-attribute
FilesystemConfig
A class for handling filesystem operations for configuration.
This class provides methods for resolving paths and reading configuration files.
get_resource_path
A method that resolves a resource path.
This method handles both packaged (frozen) and development environments by resolving the appropriate absolute path to a resource.
Parameters:
-
path(str) –The relative path to the resource.
Returns:
-
Path–The absolute Path to the resource.
Source code in dev_tool/config/filesystem.py
get_developer_token
A method that retrieves a developer token from a file.
This method reads a token from the specified file, stripping any whitespace.
Parameters:
-
path(Path) –The path to the file containing the token.
Returns:
-
str | None–The token as a string, or None if the file doesn't exist.