mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-02-23 17:23:40 +00:00
12 lines
293 B
Python
12 lines
293 B
Python
import os
|
|
import os.path
|
|
|
|
|
|
def cs_path_exists(fspath):
|
|
if not os.path.exists(fspath):
|
|
return False
|
|
# make absolute so we always have a directory
|
|
abspath = os.path.abspath(fspath)
|
|
directory, filename = os.path.split(abspath)
|
|
return filename in os.listdir(directory)
|