scimba_torch.utils.paths¶
Path and file utilities for scimba_torch.
Defaults to saving in the user’s home directory under the hidden folder
.scimba/scimba_torch.
Functions
|
Get the filepath of the currently running script. |
- get_filepath_for_save(scriptname, postfix='', parent_path=PosixPath('/home/scimba'), folder_name='.scimba/scimba_torch')[source]¶
Get the filepath of the currently running script.
This is useful for saving files related to the script in a structured way. It creates the parent folder if it does not exist. The default location of this folder is
~/.scimba/scimba_torch/.- Parameters:
scriptname (
str) – The name of the current script (usually __file__).postfix (
str) – An optional postfix to append to the filename.parent_path (
Path) – The base path where the folder is located. (default:~/)folder_name (
str) – The name of the folder to be used for saving files. (default:.scimba)
- Return type:
Path- Returns:
The full path to the file with the constructed filename.