MappedFile

class MappedFile(pointer: <Error class: unknown class><<Error class: unknown class>>) : Record

The #GMappedFile represents a file mapping created with g_mapped_file_new(). It has only private members and should not be accessed directly.

Constructors

Link copied to clipboard
constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion : RecordCompanion<MappedFile, <Error class: unknown class>>

Properties

Link copied to clipboard
val glibMappedFilePointer: <Error class: unknown class><<Error class: unknown class>>

Functions

Link copied to clipboard
fun free()

This call existed before #GMappedFile had refcounting and is currently exactly the same as g_mapped_file_unref().

Link copied to clipboard

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.

Link copied to clipboard

Returns the contents of a #GMappedFile.

Link copied to clipboard
fun getLength(): <Error class: unknown class>

Returns the length of the contents of a #GMappedFile.

Link copied to clipboard

Increments the reference count of @file by one. It is safe to call this function from any thread.

Link copied to clipboard
fun unref()

Decrements the reference count of @file by one. If the reference count drops to 0, unmaps the buffer of @file and frees it.