Utils#
(nbrefactor.fileops.utils)
File utilities’ methods used across the library
- compute_plot_path(path, ipynb_fname)[source]#
Computes the full plot path. If the given path is a directory, constructs a plot filename using the provided notebook filename and plot extension. Ensures that the directory exists.
- Parameters:
path (str) – Path to a directory or file where the plot should be saved.
ipynb_fname (str) – The name of the Jupyter notebook file (without extension).
- Returns:
The full path to the plot
- Return type:
str