pcntoolkit.util.paths#
Path-related utilities for PCNtoolkit.
Functions#
|
Ensure that a directory exists, creating it if necessary. |
|
Get the default home directory for PCNtoolkit. |
|
Get the default log directory for PCNtoolkit. |
|
Get the default save directory for normative models. |
|
Get the default temp directory for PCNtoolkit. |
|
Get the standard subdirectories for saving model data. |
Module Contents#
- ensure_dir_exists(path: str) None#
Ensure that a directory exists, creating it if necessary.
- Parameters:
path (
str) – The directory path to ensure exists
- get_default_home_dir() str#
Get the default home directory for PCNtoolkit.
- Returns:
The default home directory path
- Return type:
- get_default_log_dir() str#
Get the default log directory for PCNtoolkit.
- Returns:
The default log directory path
- Return type:
- get_default_save_dir() str#
Get the default save directory for normative models.
The save directory is determined in the following order: 1. PCN_SAVE_DIR environment variable if set 2. ~/.pcntoolkit/saves if the directory exists or can be created 3. ./saves as a fallback
- Returns:
The default save directory path
- Return type:
- get_default_temp_dir() str#
Get the default temp directory for PCNtoolkit.
The temp directory is determined in the following order: 1. PCN_TEMP_DIR environment variable if set 2. ~/.pcntoolkit/temp if the directory exists or can be created 3. ./temp as a fallback
- Returns:
The default temp directory path
- Return type: