def _CheckFileStoragePathExistance(path):
  if not os.path.isdir(path):
    raise errors.FileStoragePathError("Path '%s' does not exist or is not a"
                                      " directory." % path)
  if not os.access(path, os.W_OK):
    raise errors.FileStoragePathError("Path '%s' is not writable" % path)
Checks whether the given path is usable on the file system.
dataset/ETHPy150Open ganeti/ganeti/lib/storage/filestorage.py/_CheckFileStoragePathExistance