Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

os dir exists

 >>> from pathlib import Path
 >>> Path('new_folder').is_dir()
 True
 >>> (Path.cwd() / 'new_folder' / 'file.txt').exists()
 False
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #os #dir #exists
ADD COMMENT
Topic
Name
9+6 =