libmodi(3)

NAME
libmodi.h - Library to access Mac OS disk image formats

SYNOPSIS
#include <libmodi.h>

Support functions
const char *
libmodi_get_version(void);
int
libmodi_get_access_flags_read(void);
int
libmodi_get_access_flags_read_write(void);
int
libmodi_get_access_flags_write(void);
int
libmodi_get_codepage(int *codepage, libmodi_error_t **error);
int
libmodi_set_codepage(int codepage, libmodi_error_t **error);
int
libmodi_check_file_signature(const char *filename, libmodi_error_t **error);

Available when compiled with wide character string support:
int
libmodi_check_file_signature_wide(const wchar_t *filename, libmodi_error_t **error);

Available when compiled with libbfio support:
int
libmodi_check_file_signature_file_io_handle(libbfio_handle_t *file_io_handle, libmodi_error_t **error);

Notify functions
void
libmodi_notify_set_verbose(int verbose);
int
libmodi_notify_set_stream(FILE *stream, libmodi_error_t **error);
int
libmodi_notify_stream_open(const char *filename, libmodi_error_t **error);
int
libmodi_notify_stream_close(libmodi_error_t **error);

Error functions
void
libmodi_error_free(libmodi_error_t **error);
int
libmodi_error_fprint(libmodi_error_t *error, FILE *stream);
int
libmodi_error_sprint(libmodi_error_t *error, char *string, size_t size);
int
libmodi_error_backtrace_fprint(libmodi_error_t *error, FILE *stream);
int
libmodi_error_backtrace_sprint(libmodi_error_t *error, char *string, size_t size);

Handle functions
int
libmodi_handle_initialize(libmodi_handle_t **handle, libmodi_error_t **error);
int
libmodi_handle_free(libmodi_handle_t **handle, libmodi_error_t **error);
int
libmodi_handle_signal_abort(libmodi_handle_t *handle, libmodi_error_t **error);
int
libmodi_handle_open(libmodi_handle_t *handle, const char *filename, int access_flags, libmodi_error_t **error);
int
libmodi_handle_open_band_data_files(libmodi_handle_t *handle, libmodi_error_t **error);
int
libmodi_handle_close(libmodi_handle_t *handle, libmodi_error_t **error);
ssize_t
libmodi_handle_read_buffer(libmodi_handle_t *handle, void *buffer, size_t buffer_size, libmodi_error_t **error);
ssize_t
libmodi_handle_read_buffer_at_offset(libmodi_handle_t *handle, void *buffer, size_t buffer_size, off64_t offset, libmodi_error_t **error);
off64_t
libmodi_handle_seek_offset(libmodi_handle_t *handle, off64_t offset, int whence, libmodi_error_t **error);
int
libmodi_handle_get_offset(libmodi_handle_t *handle, off64_t *offset, libmodi_error_t **error);
int
libmodi_handle_set_maximum_number_of_open_handles(libmodi_handle_t *handle, int maximum_number_of_open_handles, libmodi_error_t **error);
int
libmodi_handle_set_band_data_files_path(libmodi_handle_t *handle, const char *path, size_t path_length, libmodi_error_t **error);
int
libmodi_handle_get_media_size(libmodi_handle_t *handle, size64_t *media_size, libmodi_error_t **error);
int
libmodi_handle_get_image_type(libmodi_handle_t *handle, int *image_type, libmodi_error_t **error);

Available when compiled with wide character string support:
int
libmodi_handle_open_wide(libmodi_handle_t *handle, const wchar_t *filename, int access_flags, libmodi_error_t **error);
int
libmodi_handle_set_band_data_files_path_wide(libmodi_handle_t *handle, const wchar_t *path, size_t path_length, libmodi_error_t **error);

Available when compiled with libbfio support:
int
libmodi_handle_open_file_io_handle(libmodi_handle_t *handle, libbfio_handle_t *file_io_handle, int access_flags, libmodi_error_t **error);
int
libmodi_handle_open_band_data_files_file_io_pool(libmodi_handle_t *handle, libbfio_pool_t *file_io_pool, libmodi_error_t **error);

DESCRIPTION
The libmodi_get_version() function is used to retrieve the library version.

RETURN VALUES
Most of the functions return NULL or -1 on error, dependent on the return type. For the actual return values see "libmodi.h".

ENVIRONMENT
None

FILES
None

NOTES
libmodi can be compiled with wide character support (wchar_t).

To compile libmodi with wide character support use: ./configure --enable-wide-character-type=yes or define: _UNICODE or UNICODE during compilation.

LIBMODI_WIDE_CHARACTER_TYPE in libmodi/features.h can be used to determine if libmodi was compiled with wide character support.

BUGS
Please report bugs of any kind on the project issue tracker: https://github.com/libyal/libmodi/issues

AUTHOR
These man pages are generated from "libmodi.h".

COPYRIGHT
Copyright (C) 2012-2025, Joachim Metz <joachim.metz@gmail.com>.

This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

SEE ALSO
the libmodi.h include file