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

Function get_proper_file_url

ci/compiler/platformio_cache.py:561–576  ·  view source on GitHub ↗

Convert a path to a proper file:// URL for platformio.ini files.

(path: Path)

Source from the content-addressed store, hash-verified

559
560
561def get_proper_file_url(path: Path) -> str:
562 """Convert a path to a proper file:// URL for platformio.ini files."""
563 # For PlatformIO on Windows, use the Windows path directly (not file:// URL)
564 # This avoids issues with path parsing in PlatformIO
565 import platform
566
567 resolved_path = path.resolve()
568
569 if platform.system() == "Windows":
570 # On Windows, PlatformIO handles Windows paths directly better than file:// URLs
571 # Convert to Windows path format
572 return str(resolved_path)
573 else:
574 # On Unix systems, use proper file:// URL format
575 posix_path = resolved_path.as_posix()
576 return f"file://{posix_path}"
577
578
579def unzip_and_install(

Callers 1

handle_zip_artifactFunction · 0.85

Calls 1

resolveMethod · 0.45

Tested by

no test coverage detected