You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9 lines
315 B
9 lines
315 B
import os
|
|
from tools.lib.file_helpers import mkdirs_exists_ok
|
|
|
|
DEFAULT_CACHE_DIR = os.path.expanduser("~/.commacache")
|
|
|
|
def cache_path_for_file_path(fn, cache_prefix=None):
|
|
dir_ = os.path.join(DEFAULT_CACHE_DIR, "local")
|
|
mkdirs_exists_ok(dir_)
|
|
return os.path.join(dir_, os.path.abspath(fn).replace("/", "_"))
|
|
|