t.w.s.FileStream(SimpleStream) : class documentation

Part of twisted.web2.stream View Source View In Hierarchy

Implements interfaces: twisted.web2.stream.ISendfileableStream

No class docstring
Method __init__ Create the stream from file f. If you specify start and length, use only that portion of the file.
Method read Read some data. If sendfile == False, returns an object conforming to the buffer interface, or else a Deferred.
Method close Prematurely close this stream. Should also cause further reads to return None. Additionally, .length should be set to 0.

Inherited from SimpleStream:

Method split Split this stream into two, at byte position 'point'.
def __init__(self, f, start=0, length=None, useMMap=bool(mmap)): (source)
Create the stream from file f. If you specify start and length, use only that portion of the file.
def read(self, sendfile=False): (source)

Read some data. If sendfile == False, returns an object conforming to the buffer interface, or else a Deferred.

If sendfile == True, returns either the above, or a SendfileBuffer.
def close(self): (source)
Prematurely close this stream. Should also cause further reads to return None. Additionally, .length should be set to 0.
API Documentation for Twisted, generated by pydoctor at 2011-10-27 16:17:34.