Пример #1
0
def isdir(path):
    return exists(path) and stat.S_ISDIR(ndsos.stat(path)[0])
Пример #2
0
def isfile(path):
    return exists(path) and stat.S_ISREG(ndsos.stat(path)[0])
Пример #3
0
def exists(path):
    try:
        ndsos.stat(path)
    except OSError:
        return False
    return True
Пример #4
0
def isdir(path):
    return exists(path) and stat.S_ISDIR(ndsos.stat(path)[0])
Пример #5
0
def isfile(path):
    return exists(path) and stat.S_ISREG(ndsos.stat(path)[0])
Пример #6
0
def exists(path):
    try:
        ndsos.stat(path)
    except OSError:
        return False
    return True