MappedFile

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

Constructors

this
this(string filename, bool writable)

Maps a file into memory. On UNIX, this is using the mmap() function.

Members

Functions

getBytes
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.

getContents
string getContents()

Returns the contents of a #GMappedFile.

getLength
size_t getLength()

Returns the length of the contents of a #GMappedFile.

Static functions

newFromFd
glib.mapped_file.MappedFile newFromFd(int fd, bool writable)

Maps a file into memory. On UNIX, this is using the mmap() function.

Inherited Members

From Boxed

cInstancePtr
void* cInstancePtr;

Pointer to the C boxed value

getType
GType getType()

Get the GType of this boxed type.

gType
GType gType [@property getter]

Boxed GType property.

self
Boxed self()

Convenience method to return this cast to a type. For use in D with statements.

copy_
void* copy_()

Make a copy of the wrapped C boxed data.

boxedCopy
void* boxedCopy(void* cBoxed)

Copy a C boxed value using g_boxed_copy.

boxedFree
void boxedFree(void* cBoxed)

Free a C boxed value using g_boxed_free.