Home | Trees | Index | Help |
---|
Package pyGlobus :: Module ftpClientPlugin :: Class RestartMarker |
|
A class to wrap the ftp client restart marker attributes.
It provides various get and set methods to control the properties of a transfer that is about to restart.Method Summary | |
---|---|
Constructs an instance. | |
Destroy an instance. | |
Creates a deep copy of iteself. | |
Initialize the marker from a string. | |
Return the underlying ftp client restart marker handle. | |
Get total bytes accounted for in restart marker. | |
Insert a range into the marker. | |
Set the offset for a restart marker. | |
Insert the offset to restart at. | |
Return a string represenation of the marker. |
Method Details |
---|
__init__(self,
handle=None)
|
__del__(self)
|
copy(self)Creates a deep copy of iteself. A RestartMarker is thrown if unable to make the copy.
|
from_string(self, markerStr)Initialize the marker from a string.
|
get_handle(self)Return the underlying ftp client restart marker handle.
|
get_total(self)Get total bytes accounted for in restart marker. This funtion will return the sum of all bytes accounted for in a restart marker. If this restart marker contains a stream offset then this value is the same as the offset (not the ascii offset) that it was set with. If it is a range list, it a sum of all the bytes in the ranges.
|
insert_range(self, offset, endOffset)Insert a range into the marker. This method updates the marker with a new byte range, suitable for using to restart an extended block mode transfer. Adjacent ranges within the marker will be combined into a single entry in the marker. A marker can only hold a range list or a stream offset. Calling this method after calling set_offset() will result in a marker suitable only for use restarting an extended block mode transfer.
|
set_ascii_offset(self, offset, asciiOffset)Set the offset for a restart marker. This method modifies the marker to contain a stream offset, suitable for using to restart a steam mode transfer. A marker can only hold a range list or a stream offset. Calling this method after calling insert_range() will delete the ranges associated with the marker, and replace it with a marker suitable only for use restarting a stream mode transfer. When restarting an ASCII type transfer, use this method to set both the offset used in the local representation of an ACSII file, and the network representation of the ASCII file. For UNIX systems, the former includes counts newlines as one character towards the file offset, and the latter counts them as 2 characters (CRLF).
|
set_offset(self, offset)Insert the offset to restart at. This method modifies the marker to contain a stream offset, suitable for using to restart a steam mode transfer. A marker can only hold a range list or a stream offset. Calling this method after calling insert_range() will delete the ranges associated with the marker, and replace it with a marker suitable only for use restarting a stream mode transfer. When restarting an ASCII type transfer, the offset must take into account the additional carriage return characters added to the data stream.
|
to_string(self)Return a string represenation of the marker. Returns a string suitable for sending to the FTP REST command, or for a later call to from_string().
|
Home | Trees | Index | Help |
---|
Generated by Epydoc 2.0 on Thu Jul 15 16:32:55 2004 | http://epydoc.sf.net |