Package twisted :: Package persisted :: Module filepile :: Class FilePileIterator
[show private | hide private]
[frames | no frames]

Class FilePileIterator


I am a sorted list of files stored in a tree of directories. I map filenames to Python objects using a 'loader' factory function.
Method Summary
  __init__(self, dirname, loader, pilext, itemext, cmpfunc)
  __iter__(self)
  jumpTo(self, *path)
'Seek' my internal cursor forward to be as close as possible to an object at a given path.
  next(self, forwards)
Get the next item at my current cursor location.
  prev(self)
Synonym for self.next(False).
  rewind(self)
Jump back to the beginning of the top level directory, as if I had just been instantiated.

Method Details

jumpTo(self, *path)

'Seek' my internal cursor forward to be as close as possible to an object at a given path. This object does not need to exist, but if it does, it will be the next object returned by self.next().

next(self, forwards=1)

Get the next item at my current cursor location. This will always ben an object created by self.loader. If 'forwards' is false, go backwards.
Raises:
- StopIteration when there are no items left.

prev(self)

Synonym for self.next(False).

rewind(self)

Jump back to the beginning of the top level directory, as if I had just been instantiated.

Generated by Epydoc 1.1 on Fri Jun 27 03:45:38 2003 http://epydoc.sf.net