Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pathlib check is file

from pathlib import Path

my_file = Path("/path/to/file")
if my_file.is_file():
    # file exists
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #pathlib #check #file
ADD COMMENT
Topic
Name
5+1 =