def stat(filepath): info, err = Stat(filepath) if err: raise OSError(err.Error()) return StatResult(info)
def isdir(path): info, err = Stat(path) if info and err is None: return info.Mode().IsDir() return False
def isfile(path): info, err = Stat(path) if info and err is None: return info.Mode().IsRegular() return False
def exists(path): _, err = Stat(path) return err is None