t.c.u.UnixSFTPFile : class documentation

Part of twisted.conch.unix View Source View In Hierarchy

Implements interfaces: twisted.conch.interfaces.ISFTPFile

Undocumented
Method __init__ Undocumented
Method close Close the file.
Method readChunk Read from the file.
Method writeChunk Write to the file.
Method getAttrs Return the attributes for the file.
Method setAttrs Set the attributes for the file.
def __init__(self, server, filename, flags, attrs): (source)
Undocumented
def close(self): (source)

Close the file.

This method returns nothing if the close succeeds immediately, or a Deferred that is called back when the close succeeds.
def readChunk(self, offset, length): (source)

Read from the file.

If EOF is reached before any data is read, raise EOFError.

This method returns the data as a string, or a Deferred that is called back with same.
Parametersoffsetan integer that is the index to start from in the file.
lengththe maximum length of data to return. The actual amount returned may less than this. For normal disk files, however, this should read the requested number (up to the end of the file).
def writeChunk(self, offset, data): (source)

Write to the file.

This method returns when the write completes, or a Deferred that is called when it completes.
Parametersoffsetan integer that is the index to start from in the file.
dataa string that is the data to write.
def getAttrs(self): (source)

Return the attributes for the file.

This method returns a dictionary in the same format as the attrs argument to openFile or a Deferred that is called back with same.
def setAttrs(self, attrs): (source)

Set the attributes for the file.

This method returns when the attributes are set or a Deferred that is called back when they are.
Parametersattrsa dictionary in the same format as the attrs argument to openFile.
API Documentation for Twisted, generated by pydoctor at 2011-10-27 16:17:34.