MCPcopy Create free account
hub / github.com/XingangPan/DragGAN / make_cache_dir_path

Function make_cache_dir_path

dnnlib/util.py:124–133  ·  view source on GitHub ↗
(*paths: str)

Source from the content-addressed store, hash-verified

122 _dnnlib_cache_dir = path
123
124def make_cache_dir_path(*paths: str) -> str:
125 if _dnnlib_cache_dir is not None:
126 return os.path.join(_dnnlib_cache_dir, *paths)
127 if 'DNNLIB_CACHE_DIR' in os.environ:
128 return os.path.join(os.environ['DNNLIB_CACHE_DIR'], *paths)
129 if 'HOME' in os.environ:
130 return os.path.join(os.environ['HOME'], '.cache', 'dnnlib', *paths)
131 if 'USERPROFILE' in os.environ:
132 return os.path.join(os.environ['USERPROFILE'], '.cache', 'dnnlib', *paths)
133 return os.path.join(tempfile.gettempdir(), '.cache', 'dnnlib', *paths)
134
135# Small util functions
136# ------------------------------------------------------------------------------------------

Callers 1

open_urlFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected