(filename)
Returns the contents of a file.


  Args:
    filename: path to a file.
  Returns:
    a string.
  Raises:
    FileDoesNotExist: if the file does not exist
    IOError: for other local IO errors
Returns the contents of a file.
Returns the contents of a file .
def GetFileContents(filename):
  """Returns the contents of a file.


  Args:
    filename: path to a file.
  Returns:
    a string.
  Raises:
    FileDoesNotExist: if the file does not exist
    IOError: for other local IO errors
  """
  try:
    return open(filename).read()
  except IOError as e:
    if e.errno == errno.ENOENT:
      raise FileDoesNotExist(filename)
    raise
def GetFileContents ( filename ) : try : return open ( filename ) . read ( ) except IOError as e : if e . errno == errno . ENOENT : raise FileDoesNotExist ( filename ) raise