The MappedFile represents a file mapping created with MappedFile.
It has only private members and should not be accessed directly.
Example: Map a file and print its content and size:
public static int main (string[] args) {
try {
MappedFile file = new MappedFile ("test.vala", false);
print ((string) file.get_contents ());
print ("Size: %" + size_t.FORMAT + " bytes\n", file.get_length ());
} catch (FileError e) {
print ("FileError: %s\n", e.message);
}
return 0;
}
valac --pkg glib-2.0 GLib.MappedFile.vala