MCPcopy
hub / github.com/AdnanHodzic/auto-cpufreq / read_file

Method read_file

auto_cpufreq/modules/system_info.py:220–226  ·  view source on GitHub ↗
(path: str)

Source from the content-addressed store, hash-verified

218
219 @staticmethod
220 def read_file(path: str) -> Optional[str]:
221
222 try:
223 with open(path, "r") as f:
224 return f.read().strip()
225 except (FileNotFoundError, OSError):
226 return None
227
228 @staticmethod
229 def get_battery_path() -> Optional[str]:

Callers 2

get_battery_pathMethod · 0.80
battery_infoMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected