~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tree.py

  • Committer: Martin Pool
  • Date: 2008-10-16 03:58:42 UTC
  • mfrom: (3763.3.3 1.8)
  • mto: This revision was merged to the branch mainline in revision 3779.
  • Revision ID: mbp@sourcefrog.net-20081016035842-77pczqghpnd5rxkt
merge 1.8final back to trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
264
264
        """
265
265
        raise NotImplementedError(self.get_file)
266
266
 
267
 
    def get_file_text(self, file_id, path=None):
268
 
        """Return the byte content of a file.
269
 
 
270
 
        :param file_id: The file_id of the file.
271
 
        :param path: The path of the file.
272
 
        If both file_id and path are supplied, an implementation may use
273
 
        either one.
274
 
        """
275
 
        my_file = self.get_file(file_id, path)
276
 
        try:
277
 
            return my_file.read()
278
 
        finally:
279
 
            my_file.close()
280
 
 
281
 
    def get_file_lines(self, file_id, path=None):
282
 
        """Return the content of a file, as lines.
283
 
 
284
 
        :param file_id: The file_id of the file.
285
 
        :param path: The path of the file.
286
 
        If both file_id and path are supplied, an implementation may use
287
 
        either one.
288
 
        """
289
 
        return osutils.split_lines(self.get_file_text(file_id, path))
290
 
 
291
267
    def get_file_mtime(self, file_id, path=None):
292
268
        """Return the modification time for a file.
293
269