(self, path)
A context manager that sets and restores a file path prefix.

    Example usage:

       with myPackageWriter.FilePathPrefix(path):
         myPackageWriter.WriteDataAsFile(content, 'foo')
    Args:
      path: (str) A top level path.
    Yields:
      (nothing)
A context manager that sets and restores a file path prefix.
A context manager that sets and restores a file path prefix .
def FilePathPrefix(self, path):
    """A context manager that sets and restores a file path prefix.

    Example usage:

       with myPackageWriter.FilePathPrefix(path):
         myPackageWriter.WriteDataAsFile(content, 'foo')
    Args:
      path: (str) A top level path.
    Yields:
      (nothing)
    """
    old_prefix = self._file_path_prefix
    self.SetFilePathPrefix(path)
    try:
      yield
    finally:
      self._file_path_prefix = old_prefix
def FilePathPrefix ( self , path ) : old_prefix = self . _file_path_prefix self . SetFilePathPrefix ( path ) try : yield finally : self . _file_path_prefix = old_prefix