Ramfile¶
-
class Ramfile¶
An in-memory buffer specifically designed for downloading files to memory.
Inheritance diagram
digraph inheritance2fef899c70 { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "Ramfile" [URL="acron.core.Ramfile.html#acron.core.Ramfile",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "Ramfile" [arrowsize=0.75,style=""]; }- Ramfile.__getstate__()¶
- Ramfile.__init__()¶
- Ramfile.__setstate__()¶
- Ramfile.clear()¶
Empties the current buffer contents.
- Ramfile.get_data()¶
Returns the entire buffer contents as a string, regardless of the current data pointer.
- Ramfile.get_data_size()¶
Returns the size of the entire buffer contents.
- Ramfile.read()¶
Extracts and returns the indicated number of characters from the current data pointer, and advances the data pointer. If the data pointer exceeds the end of the buffer, returns empty string.
The interface here is intentionally designed to be similar to that for Python’s file.read() function.
- Ramfile.readline()¶
Assumes the stream represents a text file, and extracts one line up to and including the trailing newline character. Returns empty string when the end of file is reached.
The interface here is intentionally designed to be similar to that for Python’s file.readline() function.
- Ramfile.readlines()¶
- Ramfile.seek()¶
Moves the data pointer to the indicated byte position. It is not an error to move the pointer past the end of data.
- Ramfile.tell()¶
Returns the current data pointer position as a byte offset from the beginning of the stream.