Home Assistant Unofficial Reference 2024.12.1
util.py
Go to the documentation of this file.
1 """Utils for local file."""
2 
3 import os
4 
5 
6 def check_file_path_access(file_path: str) -> bool:
7  """Check that filepath given is readable."""
8  if not os.access(file_path, os.R_OK):
9  return False
10  return True
bool check_file_path_access(str file_path)
Definition: util.py:6