MCPcopy Create free account
hub / github.com/FastLED/FastLED / get_breadcrumb_path

Function get_breadcrumb_path

ci/util/download_breadcrumb.py:22–36  ·  view source on GitHub ↗

Get the breadcrumb file path for a given URL in the cache directory. Args: cache_dir: Base cache directory url: URL being downloaded (used to generate unique directory) filename: Name of the breadcrumb file (default: info.json) Returns: Path to the brea

(cache_dir: Path, url: str, filename: str = "info.json")

Source from the content-addressed store, hash-verified

20
21
22def get_breadcrumb_path(cache_dir: Path, url: str, filename: str = "info.json") -> Path:
23 """
24 Get the breadcrumb file path for a given URL in the cache directory.
25
26 Args:
27 cache_dir: Base cache directory
28 url: URL being downloaded (used to generate unique directory)
29 filename: Name of the breadcrumb file (default: info.json)
30
31 Returns:
32 Path to the breadcrumb file
33 """
34 cache_key = str(sanitize_url_for_path(url))
35 artifact_dir = cache_dir / cache_key
36 return artifact_dir / filename
37
38
39def read_breadcrumb(breadcrumb_path: Path) -> Optional[dict[str, Any]]:

Callers 2

check_cached_downloadFunction · 0.85

Calls 1

sanitize_url_for_pathFunction · 0.90

Tested by

no test coverage detected