c4d.storage.MemoryFileStruct

class c4d.storage.MemoryFileStruct

This class is used to write to memory instead of to a file.

Overview

Magic Methods

MemoryFileStruct.__init__()

Memory Buffer Operations

MemoryFileStruct.GetData()

Retrieves all data written to the memory file.

MemoryFileStruct.SetMemoryReadMode()

Sets the buffer read from a memory block instead of from a file.

MemoryFileStruct.SetMemoryWriteMode()

Sets the buffer ready to be written to.

Members

Magic Methods

MemoryFileStruct.__init__(self)

Memory Buffer Operations

MemoryFileStruct.GetData(self)

Retrieves all data written to the memory file.

Return type

Tuple[bytearray, int]

Returns

A tuple with the buffer data and size.

MemoryFileStruct.SetMemoryReadMode(self, adr, size)

Sets the buffer read from a memory block instead of from a file.

Parameters
  • adr (Union[bytearray, memoryview]) – The memory address to read from.

  • size (int) – The size of the memory block, or -1 if the buffer is “big enough”.

MemoryFileStruct.SetMemoryWriteMode(self)

Sets the buffer ready to be written to.