os.path: Implement dirname(), basename().

pull/20/merge
Paul Sokolovsky 2015-01-27 04:25:20 +02:00
rodzic 0b53579d85
commit caa1b279ac
1 zmienionych plików z 6 dodań i 0 usunięć

Wyświetl plik

@ -28,6 +28,12 @@ def split(path):
head = "/"
return (head, r[1])
def dirname(path):
return split(path)[0]
def basename(path):
return split(path)[1]
def exists(path):
return os.access(path, os.F_OK)