Files
StarPilot/system/updated/common.py
Vehicle Researcher 33d5cfc393 openpilot v0.10.3 release
date: 2025-12-18T23:23:16
master commit: 3cdee7b54718ee14bd85befd6c5bad3d699c5479
2025-12-18 23:23:21 -08:00

17 lines
457 B
Python

import os
import pathlib
def get_consistent_flag(path: str) -> bool:
consistent_file = pathlib.Path(os.path.join(path, ".overlay_consistent"))
return consistent_file.is_file()
def set_consistent_flag(path: str, consistent: bool) -> None:
os.sync()
consistent_file = pathlib.Path(os.path.join(path, ".overlay_consistent"))
if consistent:
consistent_file.touch()
elif not consistent:
consistent_file.unlink(missing_ok=True)
os.sync()