1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-04 15:39:43 +00:00

adding basename/dirname for #131

This commit is contained in:
deadc0de6
2019-05-04 17:38:34 +02:00
parent c158ec933b
commit 158475f011

View File

@@ -17,3 +17,13 @@ def exists(path):
def exists_in_path(name, path=None):
"""return true when executable exists in os path"""
return shutil.which(name, os.F_OK | os.X_OK, path) is not None
def basename(path):
"""return basename"""
return os.path.basename(path)
def dirname(path):
"""return dirname"""
return os.path.dirname(path)