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