Scroll to navigation

libfsext(3) Library Functions Manual libfsext(3)

NAME

libfsext.hLibrary to support the Extended File System (ext) format

SYNOPSIS

#include <libfsext.h>

Support functions
const char *
libfsext_get_version(void);

int
libfsext_get_access_flags_read(void);

int
libfsext_get_codepage(int *codepage, libfsext_error_t **error);

int
libfsext_set_codepage(int codepage, libfsext_error_t **error);

int
libfsext_check_volume_signature(const char *filename, libfsext_error_t **error);

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

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

Notify functions
void
libfsext_notify_set_verbose(int verbose);

int
libfsext_notify_set_stream(FILE *stream, libfsext_error_t **error);

int
libfsext_notify_stream_open(const char *filename, libfsext_error_t **error);

int
libfsext_notify_stream_close(libfsext_error_t **error);

Error functions
void
libfsext_error_free(libfsext_error_t **error);

int
libfsext_error_fprint(libfsext_error_t *error, FILE *stream);

int
libfsext_error_sprint(libfsext_error_t *error, char *string, size_t size);

int
libfsext_error_backtrace_fprint(libfsext_error_t *error, FILE *stream);

int
libfsext_error_backtrace_sprint(libfsext_error_t *error, char *string, size_t size);

Volume functions
int
libfsext_volume_initialize(libfsext_volume_t **volume, libfsext_error_t **error);

int
libfsext_volume_free(libfsext_volume_t **volume, libfsext_error_t **error);

int
libfsext_volume_signal_abort(libfsext_volume_t *volume, libfsext_error_t **error);

int
libfsext_volume_open(libfsext_volume_t *volume, const char *filename, int access_flags, libfsext_error_t **error);

int
libfsext_volume_close(libfsext_volume_t *volume, libfsext_error_t **error);

int
libfsext_volume_get_format_version(libfsext_volume_t *volume, uint8_t *format_version, libfsext_error_t **error);

int
libfsext_volume_get_features_flags(libfsext_volume_t *volume, uint32_t *compatible_features_flags, uint32_t *incompatible_features_flags, uint32_t *read_only_compatible_features_flags, libfsext_error_t **error);

int
libfsext_volume_get_identifier(libfsext_volume_t *volume, uint8_t *uuid_data, size_t uuid_data_size, libfsext_error_t **error);

int
libfsext_volume_get_utf8_label_size(libfsext_volume_t *volume, size_t *utf8_string_size, libfsext_error_t **error);

int
libfsext_volume_get_utf8_label(libfsext_volume_t *volume, uint8_t *utf8_string, size_t utf8_string_size, libfsext_error_t **error);

int
libfsext_volume_get_utf16_label_size(libfsext_volume_t *volume, size_t *utf16_string_size, libfsext_error_t **error);

int
libfsext_volume_get_utf16_label(libfsext_volume_t *volume, uint16_t *utf16_string, size_t utf16_string_size, libfsext_error_t **error);

int
libfsext_volume_get_utf8_last_mount_path_size(libfsext_volume_t *volume, size_t *utf8_string_size, libfsext_error_t **error);

int
libfsext_volume_get_utf8_last_mount_path(libfsext_volume_t *volume, uint8_t *utf8_string, size_t utf8_string_size, libfsext_error_t **error);

int
libfsext_volume_get_utf16_last_mount_path_size(libfsext_volume_t *volume, size_t *utf16_string_size, libfsext_error_t **error);

int
libfsext_volume_get_utf16_last_mount_path(libfsext_volume_t *volume, uint16_t *utf16_string, size_t utf16_string_size, libfsext_error_t **error);

int
libfsext_volume_get_last_mount_time(libfsext_volume_t *volume, int32_t *posix_time, libfsext_error_t **error);

int
libfsext_volume_get_last_written_time(libfsext_volume_t *volume, int32_t *posix_time, libfsext_error_t **error);

int
libfsext_volume_get_root_directory(libfsext_volume_t *volume, libfsext_file_entry_t **file_entry, libfsext_error_t **error);

int
libfsext_volume_get_number_of_file_entries(libfsext_volume_t *volume, uint32_t *number_of_file_entries, libfsext_error_t **error);

int
libfsext_volume_get_file_entry_by_inode(libfsext_volume_t *volume, uint32_t inode_number, libfsext_file_entry_t **file_entry, libfsext_error_t **error);

int
libfsext_volume_get_file_entry_by_utf8_path(libfsext_volume_t *volume, const uint8_t *utf8_string, size_t utf8_string_length, libfsext_file_entry_t **file_entry, libfsext_error_t **error);

int
libfsext_volume_get_file_entry_by_utf16_path(libfsext_volume_t *volume, const uint16_t *utf16_string, size_t utf16_string_length, libfsext_file_entry_t **file_entry, libfsext_error_t **error);

Available when compiled with wide character string support:
int
libfsext_volume_open_wide(libfsext_volume_t *volume, const wchar_t *filename, int access_flags, libfsext_error_t **error);

Available when compiled with libbfio support:
int
libfsext_volume_open_file_io_handle(libfsext_volume_t *volume, libbfio_handle_t *file_io_handle, int access_flags, libfsext_error_t **error);

File entry functions
int
libfsext_file_entry_free(libfsext_file_entry_t **file_entry, libfsext_error_t **error);

int
libfsext_file_entry_is_empty(libfsext_file_entry_t *file_entry, libfsext_error_t **error);

int
libfsext_file_entry_get_inode_number(libfsext_file_entry_t *file_entry, uint32_t *inode_number, libfsext_error_t **error);

int
libfsext_file_entry_get_access_time(libfsext_file_entry_t *file_entry, int64_t *posix_time, libfsext_error_t **error);

int
libfsext_file_entry_get_creation_time(libfsext_file_entry_t *file_entry, int64_t *posix_time, libfsext_error_t **error);

int
libfsext_file_entry_get_inode_change_time(libfsext_file_entry_t *file_entry, int64_t *posix_time, libfsext_error_t **error);

int
libfsext_file_entry_get_modification_time(libfsext_file_entry_t *file_entry, int64_t *posix_time, libfsext_error_t **error);

int
libfsext_file_entry_get_deletion_time(libfsext_file_entry_t *file_entry, int32_t *posix_time, libfsext_error_t **error);

int
libfsext_file_entry_get_file_mode(libfsext_file_entry_t *file_entry, uint16_t *file_mode, libfsext_error_t **error);

int
libfsext_file_entry_get_number_of_links(libfsext_file_entry_t *file_entry, uint16_t *number_of_links, libfsext_error_t **error);

int
libfsext_file_entry_get_owner_identifier(libfsext_file_entry_t *file_entry, uint32_t *owner_identifier, libfsext_error_t **error);

int
libfsext_file_entry_get_group_identifier(libfsext_file_entry_t *file_entry, uint32_t *group_identifier, libfsext_error_t **error);

int
libfsext_file_entry_get_device_identifier(libfsext_file_entry_t *file_entry, uint32_t *device_identifier, libfsext_error_t **error);

int
libfsext_file_entry_get_device_number(libfsext_file_entry_t *file_entry, uint8_t *major_device_number, uint8_t *minor_device_number, libfsext_error_t **error);

int
libfsext_file_entry_get_utf8_name_size(libfsext_file_entry_t *file_entry, size_t *utf8_string_size, libfsext_error_t **error);

int
libfsext_file_entry_get_utf8_name(libfsext_file_entry_t *file_entry, uint8_t *utf8_string, size_t utf8_string_size, libfsext_error_t **error);

int
libfsext_file_entry_get_utf16_name_size(libfsext_file_entry_t *file_entry, size_t *utf16_string_size, libfsext_error_t **error);

int
libfsext_file_entry_get_utf16_name(libfsext_file_entry_t *file_entry, uint16_t *utf16_string, size_t utf16_string_size, libfsext_error_t **error);

int
libfsext_file_entry_get_utf8_symbolic_link_target_size(libfsext_file_entry_t *file_entry, size_t *utf8_string_size, libfsext_error_t **error);

int
libfsext_file_entry_get_utf8_symbolic_link_target(libfsext_file_entry_t *file_entry, uint8_t *utf8_string, size_t utf8_string_size, libfsext_error_t **error);

int
libfsext_file_entry_get_utf16_symbolic_link_target_size(libfsext_file_entry_t *file_entry, size_t *utf16_string_size, libfsext_error_t **error);

int
libfsext_file_entry_get_utf16_symbolic_link_target(libfsext_file_entry_t *file_entry, uint16_t *utf16_string, size_t utf16_string_size, libfsext_error_t **error);

int
libfsext_file_entry_get_number_of_extended_attributes(libfsext_file_entry_t *file_entry, int *number_of_extended_attributes, libfsext_error_t **error);

int
libfsext_file_entry_get_extended_attribute_by_index(libfsext_file_entry_t *file_entry, int extended_attribute_index, libfsext_extended_attribute_t **extended_attribute, libfsext_error_t **error);

int
libfsext_file_entry_has_extended_attribute_by_utf8_name(libfsext_file_entry_t *file_entry, const uint8_t *utf8_string, size_t utf8_string_length, libfsext_error_t **error);

int
libfsext_file_entry_has_extended_attribute_by_utf16_name(libfsext_file_entry_t *file_entry, const uint16_t *utf16_string, size_t utf16_string_length, libfsext_error_t **error);

int
libfsext_file_entry_get_extended_attribute_by_utf8_name(libfsext_file_entry_t *file_entry, const uint8_t *utf8_string, size_t utf8_string_length, libfsext_extended_attribute_t **extended_attribute, libfsext_error_t **error);

int
libfsext_file_entry_get_extended_attribute_by_utf16_name(libfsext_file_entry_t *file_entry, const uint16_t *utf16_string, size_t utf16_string_length, libfsext_extended_attribute_t **extended_attribute, libfsext_error_t **error);

int
libfsext_file_entry_get_number_of_sub_file_entries(libfsext_file_entry_t *file_entry, int *number_of_sub_entries, libfsext_error_t **error);

int
libfsext_file_entry_get_sub_file_entry_by_index(libfsext_file_entry_t *file_entry, int sub_file_entry_index, libfsext_file_entry_t **sub_file_entry, libfsext_error_t **error);

int
libfsext_file_entry_get_sub_file_entry_by_utf8_name(libfsext_file_entry_t *file_entry, const uint8_t *utf8_string, size_t utf8_string_length, libfsext_file_entry_t **sub_file_entry, libfsext_error_t **error);

int
libfsext_file_entry_get_sub_file_entry_by_utf16_name(libfsext_file_entry_t *file_entry, const uint16_t *utf16_string, size_t utf16_string_length, libfsext_file_entry_t **sub_file_entry, libfsext_error_t **error);

ssize_t
libfsext_file_entry_read_buffer(libfsext_file_entry_t *file_entry, void *buffer, size_t buffer_size, libfsext_error_t **error);

ssize_t
libfsext_file_entry_read_buffer_at_offset(libfsext_file_entry_t *file_entry, void *buffer, size_t buffer_size, off64_t offset, libfsext_error_t **error);

off64_t
libfsext_file_entry_seek_offset(libfsext_file_entry_t *file_entry, off64_t offset, int whence, libfsext_error_t **error);

int
libfsext_file_entry_get_offset(libfsext_file_entry_t *file_entry, off64_t *offset, libfsext_error_t **error);

int
libfsext_file_entry_get_size(libfsext_file_entry_t *file_entry, size64_t *size, libfsext_error_t **error);

int
libfsext_file_entry_get_number_of_extents(libfsext_file_entry_t *file_entry, int *number_of_extents, libfsext_error_t **error);

int
libfsext_file_entry_get_extent_by_index(libfsext_file_entry_t *file_entry, int extent_index, off64_t *extent_offset, size64_t *extent_size, uint32_t *extent_flags, libfsext_error_t **error);

Extended attribute functions
int
libfsext_extended_attribute_free(libfsext_extended_attribute_t **extended_attribute, libfsext_error_t **error);

int
libfsext_extended_attribute_get_utf8_name_size(libfsext_extended_attribute_t *extended_attribute, size_t *utf8_string_size, libfsext_error_t **error);

int
libfsext_extended_attribute_get_utf8_name(libfsext_extended_attribute_t *extended_attribute, uint8_t *utf8_string, size_t utf8_string_size, libfsext_error_t **error);

int
libfsext_extended_attribute_get_utf16_name_size(libfsext_extended_attribute_t *extended_attribute, size_t *utf16_string_size, libfsext_error_t **error);

int
libfsext_extended_attribute_get_utf16_name(libfsext_extended_attribute_t *extended_attribute, uint16_t *utf16_string, size_t utf16_string_size, libfsext_error_t **error);

ssize_t
libfsext_extended_attribute_read_buffer(libfsext_extended_attribute_t *extended_attribute, void *buffer, size_t buffer_size, libfsext_error_t **error);

ssize_t
libfsext_extended_attribute_read_buffer_at_offset(libfsext_extended_attribute_t *extended_attribute, void *buffer, size_t buffer_size, off64_t offset, libfsext_error_t **error);

off64_t
libfsext_extended_attribute_seek_offset(libfsext_extended_attribute_t *extended_attribute, off64_t offset, int whence, libfsext_error_t **error);

int
libfsext_extended_attribute_get_offset(libfsext_extended_attribute_t *extended_attribute, off64_t *offset, libfsext_error_t **error);

int
libfsext_extended_attribute_get_size(libfsext_extended_attribute_t *extended_attribute, size64_t *size, libfsext_error_t **error);

int
libfsext_extended_attribute_get_number_of_extents(libfsext_extended_attribute_t *extended_attribute, int *number_of_extents, libfsext_error_t **error);

int
libfsext_extended_attribute_get_extent_by_index(libfsext_extended_attribute_t *extended_attribute, int extent_index, off64_t *extent_offset, size64_t *extent_size, uint32_t *extent_flags, libfsext_error_t **error);

DESCRIPTION

The () 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 "libfsext.h".

ENVIRONMENT

None

FILES

None

NOTES

libfsext can be compiled with wide character support (wchar_t).

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

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

BUGS

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

AUTHOR

These man pages are generated from "libfsext.h".

COPYRIGHT

Copyright (C) 2010-2024, 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 libfsext.h include file

August 28, 2022 libfsext