glib.mapped_file
Module for [MappedFile] class
class MappedFile
Types 1
classMappedFile : gobject.boxed.Boxed
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
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.