glib.mapped_file

Module for [MappedFile] class

Types 1

The #GMappedFile represents a file mapping created with [glib.mapped_file.MappedFile.new_]. It has only private members and should not be accessed directly.

Methods
void * _cPtr(Flag!"Dup" dup = No.Dup)
GType _gType() @property
MappedFile self()Returns `this`, for use in `with` statements.
glib.mapped_file.MappedFile newFromFd(int fd, bool writable)Maps a file into memory. On UNIX, this is using the mmap() function.
glib.bytes.Bytes getBytes()Creates a new #GBytes which references the data mapped from file. The mapped contents of the file must not be modified after creating this bytes object, because a #GBytes should be immutable. Retur...
string getContents()Returns the contents of a #GMappedFile.
size_t getLength()Returns the length of the contents of a #GMappedFile. Returns: the length of the contents of file.
Constructors
this(void * ptr, Flag!"Take" take)
this(string filename, bool writable)Maps a file into memory. On UNIX, this is using the mmap() function.