MappedFile.this

Maps a file into memory. On UNIX, this is using the mmap() function. If writable is TRUE, the mapped buffer may be modified, otherwise it is an error to modify the mapped buffer. Modifications to the buffer are not visible to other processes mapping the same file, and are not written back to the file. Note that modifications of the underlying file might affect the contents of the GMappedFile. Therefore, mapping should only be used if the file will not be modified, or if all modifications of the file are done atomically (e.g. using g_file_set_contents()). Since 2.8

  1. this(GMappedFile* gMappedFile)
  2. this(string filename, int writable)
    class MappedFile
    this
    (
    string filename
    ,)

Parameters

filename string

The path of the file to load, in the GLib filename encoding

writable int

whether the mapping should be writable

Throws

GException on failure. ConstructionException GTK+ fails to create the object.

Meta