🎃 Valiukas

jump to main content

python: check if file exists

Sep 28, 2022

from os.path import exists

file_exists = exists(path_to_file)
from pathlib import Path

path = Path(path_to_file)

path.is_file()