pydox.tmp_root#
- tmp_root(new: bool = False, config: object | None = None) Path[source]#
Return a temporary folder path
- Parameters:
new (bool, default = False) – Force create a new temporary folder on each call.
config (Config, default = None) – The configuration object to read the
output.rootparameter from. If set to None (default), we use the runtime configuration object.
- Return type:
Notes
The temporary folder is named after the exact creation datetime stamp, following the general format:
<output.root>/tmp/<%Y%m%d%H%M%S%f>Eg: If
output.rootis set to:/Users/johndoe/pydoxthen the temporary folder is something like:/Users/johndoe/pydox/tmp/20260717100903168376.Note that if the
output.rootconfiguration parameter is not set, we fall back on the current working directory.Also note that a unique temporary folder is created at runtime, therefore, calling
do.tmp_root()twice will return the same result.In order to force create a new temporary folder, use the argument
new=True.