pg.io.MemoryFile¶
Accessible via pg.io.MemoryFile.
- class MemoryFile(buffer)[source]¶
Bases:
pg.io.FileMemory file.
Methods:
close()Closes the file.
flush()Flushes the written content to the storage.
read([size])Reads the content of the file.
readline()Reads the next line.
seek(offset[, whence])Changes the current position of the file.
tell()Returns the current position of the file.
write(content)Writes the content of the file.
- seek(offset, whence=0)[source]¶
Changes the current position of the file.
- Return type:
- Parameters:
offset – Offset from the position to a reference point.
whence – The reference point, with 0 meaning the beginning of the file, 1 meaning the current position, or 2 meaning the end of the file.
- Returns:
The position from the beginning of the file.