'Get status of a finalized file.
Returns:
a _FileStat object similar to that returned by python\'s os.stat(path).
Throws:
FinalizationError if file is not finalized.'

def stat(self):

    self._verify_read_mode()
    request = file_service_pb.StatRequest()
    response = file_service_pb.StatResponse()
    request.set_filename(self._filename)
    _make_call('Stat', request, response)
    if (response.stat_size() == 0):
        raise ExistenceError(('File    %s    not    found.' % self._filename))
    if (response.stat_size() > 1):
        raise ValueError('Requested    stat    for    one    file.    Got    more    than    one    response.')
    file_stat_pb = response.stat(0)
    file_stat = _FileStat()
    file_stat.filename = file_stat_pb.filename()
    file_stat.finalized = file_stat_pb.finalized()
    file_stat.st_size = file_stat_pb.length()
    file_stat.st_mtime = file_stat_pb.mtime()
    file_stat.st_ctime = file_stat_pb.ctime()
    return file_stat
