Answers for "os dir exists"

0

os dir exists

>>> from pathlib import Path
 >>> Path('new_folder').is_dir()
 True
 >>> (Path.cwd() / 'new_folder' / 'file.txt').exists()
 False
Posted by: Guest on June-01-2021

Browse Popular Code Answers by Language