MCPcopy Create free account
hub / github.com/aboutcode-org/scancode-toolkit / get_codebase_cache_dir

Function get_codebase_cache_dir

src/commoncode/resource.py:1683–1693  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

1681
1682
1683def 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)

Callers 1

_setup_essentialsMethod · 0.85

Calls 2

time2tstampFunction · 0.90
get_temp_dirFunction · 0.90

Tested by

no test coverage detected