GArrowIORandomAccessFile

GArrowIORandomAccessFile — File input interface

Functions

Types and Values

Object Hierarchy

    GInterface
    ╰── GArrowIORandomAccessFile

Prerequisites

GArrowIORandomAccessFile requires GObject.

Known Implementations

GArrowIORandomAccessFile is implemented by GArrowIOMemoryMappedFile.

Description

GArrowIORandomAccessFile is an interface for file input.

Functions

garrow_io_random_access_file_get_size ()

guint64
garrow_io_random_access_file_get_size (GArrowIORandomAccessFile *file,
                                       GError **error);

Parameters

file

A GArrowIORandomAccessFile.

 

error

Return location for a GError or NULL.

[nullable]

Returns

The size of the file.


garrow_io_random_access_file_get_support_zero_copy ()

gboolean
garrow_io_random_access_file_get_support_zero_copy
                               (GArrowIORandomAccessFile *file);

Parameters

Returns

Whether zero copy read is supported or not.


garrow_io_random_access_file_read_at ()

gboolean
garrow_io_random_access_file_read_at (GArrowIORandomAccessFile *file,
                                      gint64 position,
                                      gint64 n_bytes,
                                      gint64 *n_read_bytes,
                                      guint8 *buffer,
                                      GError **error);

Parameters

file

A GArrowIORandomAccessFile.

 

position

The read start position.

 

n_bytes

The number of bytes to be read.

 

n_read_bytes

The read number of bytes.

[out]

buffer

The buffer to be read data.

[array length=n_bytes]

error

Return location for a GError or NULL.

[nullable]

Returns

TRUE on success, FALSE if there was an error.

Types and Values

GArrowIORandomAccessFile

typedef struct _GArrowIORandomAccessFile GArrowIORandomAccessFile;

GArrowIORandomAccessFileInterface

typedef struct _GArrowIORandomAccessFileInterface GArrowIORandomAccessFileInterface;