MemFile

A C File struct which reads from memory instead of disk.

Constructors

this
this(ubyte* array, size_t length)
Undocumented in source.

Members

Functions

toArray
ubyte[] toArray()
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

close
int close(void* fileStream)

MemFile implementation of C fclose.

read
size_t read(void* data, size_t bytes, size_t to_read, void* fileStream)

MemFile implementation of C fread.

seek
int seek(void* fileStream, int64_t offset, int whence)

MemFile implementation of C fseek.

tell
clong tell(void* fileStream)

MemFile implementation of C ftell.

write
size_t write(void* data, size_t bytes, size_t to_write, void* fileStream)

MemFile implementation of C fwrite Returns 0 if index is out of range

Variables

arrayptr
ubyte* arrayptr;

Pointer to data

length
size_t length;

Length of data.

readhead
ubyte* readhead;

Pointer to read head.

Meta