tempdir
Temporary folder operations
create_custom_tempdir(project_name, anatomy=None)
Backward compatibility deprecated since 2024/12/09.
Source code in client/ayon_core/pipeline/tempdir.py
74 75 76 77 78 79 80 81 82 83 84 85 86 |
|
get_temp_dir(project_name, anatomy=None, prefix=None, suffix=None, use_local_temp=False)
Get temporary dir path.
If use_local_temp
is set, tempdir will be created in local tempdir. If anatomy
is not set, default anatomy will be used. If prefix
or suffix
is not set, default values will be used.
It also supports AYON_TMPDIR
, so studio can define own temp shared repository per project or even per more granular context. Template formatting is supported also with optional keys. Folder is created in case it doesn't exists.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
project_name | str | Name of project. | required |
anatomy | Optional[Anatomy] | Project Anatomy object. | None |
suffix | Optional[str] | Suffix for tempdir. | None |
prefix | Optional[str] | Prefix for tempdir. | None |
use_local_temp | Optional[bool] | If True, temp dir will be created in local tempdir. | False |
Returns:
Name | Type | Description |
---|---|---|
str | Path to staging dir of instance. |
Source code in client/ayon_core/pipeline/tempdir.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
|