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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user