Files
dragonpilot/system/updated/common.py
Vehicle Researcher 161005a0c1 openpilot v0.10.2 release
date: 2025-11-19T19:10:11
master commit: a29fdbd02407d41ecbcc69d151bb4837bfba3cbc
2025-11-19 19:10:16 -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()