I'm looking to make memory improvements. Is there a better way to check if a file is empty besides what I currently have (checking if filepath exists and size is zero bytes)?
if os.path.exists(file_path) and os.stat(file_path).st_size == 0
I'm looking to make memory improvements. Is there a better way to check if a file is empty besides what I currently have (checking if filepath exists and size is zero bytes)?
if os.path.exists(file_path) and os.stat(file_path).st_size == 0