def Exists(self, assert_exists=None):

    exists = os.path.isfile(self.path)

    if not exists and assert_exists is True:
      raise base.ThrowError("%s: No such file", self.path)
    if exists and assert_exists is False:
      raise base.ThrowError("%s: File exists", self.path)

    return exists
Check for the existence of the given file.
dataset/ETHPy150Open ganeti/ganeti/lib/storage/filestorage.py/FileDeviceHelper.Exists