BIOSUtilities v24.11.10

Re-written public attributes of Apple EFI ID
Improved memory consumption for all utilities
Adjusted README with consolidated requirements
This commit is contained in:
Plato Mavropoulos 2024-11-11 01:18:34 +02:00
parent 29dabc7401
commit 35564f31b7
19 changed files with 252 additions and 198 deletions

View file

@ -237,6 +237,18 @@ def is_access(in_path: str, access_mode: int = os.R_OK, follow_links: bool = Fal
return os.access(in_path, access_mode, follow_symlinks=follow_links)
def is_file_read(in_path: str) -> bool:
""" Check if path is a readable file """
return isinstance(in_path, str) and is_file(in_path=in_path) and is_access(in_path=in_path)
def is_dir_read(in_path: str) -> bool:
""" Check if path is a readable directory """
return isinstance(in_path, str) and is_dir(in_path=in_path) and is_access(in_path=in_path)
def is_empty_dir(in_path: str, follow_links: bool = False) -> bool:
""" Check if directory is empty (file-wise) """