File indexing completed on 2026-05-06 08:41:18
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022 #ifndef __G_MAPPED_FILE_H__
0023 #define __G_MAPPED_FILE_H__
0024
0025 #if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
0026 #error "Only <glib.h> can be included directly."
0027 #endif
0028
0029 #include <glib/gbytes.h>
0030 #include <glib/gerror.h>
0031
0032 G_BEGIN_DECLS
0033
0034 typedef struct _GMappedFile GMappedFile;
0035
0036 GLIB_AVAILABLE_IN_ALL
0037 GMappedFile *g_mapped_file_new (const gchar *filename,
0038 gboolean writable,
0039 GError **error);
0040 GLIB_AVAILABLE_IN_ALL
0041 GMappedFile *g_mapped_file_new_from_fd (gint fd,
0042 gboolean writable,
0043 GError **error);
0044 GLIB_AVAILABLE_IN_ALL
0045 gsize g_mapped_file_get_length (GMappedFile *file);
0046 GLIB_AVAILABLE_IN_ALL
0047 gchar *g_mapped_file_get_contents (GMappedFile *file);
0048 GLIB_AVAILABLE_IN_2_34
0049 GBytes * g_mapped_file_get_bytes (GMappedFile *file);
0050 GLIB_AVAILABLE_IN_ALL
0051 GMappedFile *g_mapped_file_ref (GMappedFile *file);
0052 GLIB_AVAILABLE_IN_ALL
0053 void g_mapped_file_unref (GMappedFile *file);
0054
0055 GLIB_DEPRECATED_FOR(g_mapped_file_unref)
0056 void g_mapped_file_free (GMappedFile *file);
0057
0058 G_END_DECLS
0059
0060 #endif