Return a new, created and unique per-run cache storage directory path rooted at the `temp_dir` base temp directory in the OS-preferred representation (either bytes on Linux and Unicode elsewhere).
(temp_dir)
| 1681 | |
| 1682 | |
| 1683 | def get_codebase_cache_dir(temp_dir): |
| 1684 | """ |
| 1685 | Return a new, created and unique per-run cache storage directory path rooted |
| 1686 | at the `temp_dir` base temp directory in the OS-preferred representation |
| 1687 | (either bytes on Linux and Unicode elsewhere). |
| 1688 | """ |
| 1689 | from commoncode.fileutils import get_temp_dir |
| 1690 | from commoncode.timeutils import time2tstamp |
| 1691 | |
| 1692 | prefix = "scancode-codebase-" + time2tstamp() + "-" |
| 1693 | return get_temp_dir(base_dir=temp_dir, prefix=prefix) |
| 1694 | |
| 1695 | |
| 1696 | @attr.s(slots=True) |
no test coverage detected