Whether to treat the buffer as read-only. If true, writing to the memory file will create a copy of the buffer. If false, changes will affect the buffer. Note that when writing to the buffer, the original buffer may be discarded and a new one created due required resizing.

Set this to true if you want a null char to be appended to the buffer (e.g. for use with string functions.)

Remarks:

Null-termination might have a performance penalty (depending upon where the file is stored.) Use only when needed.

Returns:

The complete data contained in the file; or an invalidated pointer if this object does not support this function (e.g. write-only VFS files). Check for an invalidated result via csRef<>::IsValid(). Do not modify the contained data!