logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

libfsapfs.h — Library to access the Apple File System (APFS) format

Author

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

Bugs

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

Description

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

Environment

       None

Files

       None

Name

       libfsapfs.h — Library to access the Apple File System (APFS) format

Notes

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

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

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

Return Values

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

See Also

       the libfsapfs.h include file

libfsapfs                                         July 28, 2022                                     libfsapfs(3)

Synopsis

#include<libfsapfs.h>

       Support functions

       constchar*libfsapfs_get_version(void);

       intlibfsapfs_get_access_flags_read(void);

       intlibfsapfs_get_codepage(int*codepage, libfsapfs_error_t**error);

       intlibfsapfs_set_codepage(intcodepage, libfsapfs_error_t**error);

       intlibfsapfs_check_container_signature(constchar*filename, libfsapfs_error_t**error);

       intlibfsapfs_check_volume_signature(constchar*filename, libfsapfs_error_t**error);

       Available when compiled with wide character string support:

       intlibfsapfs_check_container_signature_wide(constwchar_t*filename, libfsapfs_error_t**error);

       intlibfsapfs_check_volume_signature_wide(constwchar_t*filename, libfsapfs_error_t**error);

       Available when compiled with libbfio support:

       intlibfsapfs_check_container_signature_file_io_handle(libbfio_handle_t*file_io_handle,
           libfsapfs_error_t**error);

       intlibfsapfs_check_volume_signature_file_io_handle(libbfio_handle_t*file_io_handle,
           libfsapfs_error_t**error);

       Notify functions

       voidlibfsapfs_notify_set_verbose(intverbose);

       intlibfsapfs_notify_set_stream(FILE*stream, libfsapfs_error_t**error);

       intlibfsapfs_notify_stream_open(constchar*filename, libfsapfs_error_t**error);

       intlibfsapfs_notify_stream_close(libfsapfs_error_t**error);

       Error functions

       voidlibfsapfs_error_free(libfsapfs_error_t**error);

       intlibfsapfs_error_fprint(libfsapfs_error_t*error, FILE*stream);

       intlibfsapfs_error_sprint(libfsapfs_error_t*error, char*string, size_tsize);

       intlibfsapfs_error_backtrace_fprint(libfsapfs_error_t*error, FILE*stream);

       intlibfsapfs_error_backtrace_sprint(libfsapfs_error_t*error, char*string, size_tsize);

       Container functions

       intlibfsapfs_container_initialize(libfsapfs_container_t**container, libfsapfs_error_t**error);

       intlibfsapfs_container_free(libfsapfs_container_t**container, libfsapfs_error_t**error);

       intlibfsapfs_container_signal_abort(libfsapfs_container_t*container, libfsapfs_error_t**error);

       intlibfsapfs_container_open(libfsapfs_container_t*container,  constchar*filename,  intaccess_flags,
           libfsapfs_error_t**error);

       intlibfsapfs_container_close(libfsapfs_container_t*container, libfsapfs_error_t**error);

       intlibfsapfs_container_get_size(libfsapfs_container_t*container,          size64_t*size,
           libfsapfs_error_t**error);

       intlibfsapfs_container_get_identifier(libfsapfs_container_t*container,       uint8_t*uuid_data,
           size_tuuid_data_size, libfsapfs_error_t**error);

       intlibfsapfs_container_is_locked(libfsapfs_container_t*container, libfsapfs_error_t**error);

       intlibfsapfs_container_get_number_of_volumes(libfsapfs_container_t*container,   int*number_of_volumes,
           libfsapfs_error_t**error);

       intlibfsapfs_container_get_volume_by_index(libfsapfs_container_t*container,      intvolume_index,
           libfsapfs_volume_t**volume, libfsapfs_error_t**error);

       Available when compiled with wide character string support:

       intlibfsapfs_container_open_wide(libfsapfs_container_t*container,     constwchar_t*filename,
           intaccess_flags, libfsapfs_error_t**error);

       Available when compiled with libbfio support:

       intlibfsapfs_container_open_file_io_handle(libfsapfs_container_t*container,
           libbfio_handle_t*file_io_handle, intaccess_flags, libfsapfs_error_t**error);

       Volume functions

       intlibfsapfs_volume_free(libfsapfs_volume_t**volume, libfsapfs_error_t**error);

       intlibfsapfs_volume_unlock(libfsapfs_volume_t*volume, libfsapfs_error_t**error);

       intlibfsapfs_volume_get_features_flags(libfsapfs_volume_t*volume,   uint64_t*compatible_features_flags,
           uint64_t*incompatible_features_flags,      uint64_t*read_only_compatible_features_flags,
           libfsapfs_error_t**error);

       intlibfsapfs_volume_get_size(libfsapfs_volume_t*volume, size64_t*size, libfsapfs_error_t**error);

       intlibfsapfs_volume_get_identifier(libfsapfs_volume_t*volume, uint8_t*uuid_data,  size_tuuid_data_size,
           libfsapfs_error_t**error);

       intlibfsapfs_volume_get_utf8_name_size(libfsapfs_volume_t*volume,      size_t*utf8_string_size,
           libfsapfs_error_t**error);

       intlibfsapfs_volume_get_utf8_name(libfsapfs_volume_t*volume, uint8_t*utf8_string, size_tutf8_string_size,
           libfsapfs_error_t**error);

       intlibfsapfs_volume_get_utf16_name_size(libfsapfs_volume_t*volume,      size_t*utf16_string_size,
           libfsapfs_error_t**error);

       intlibfsapfs_volume_get_utf16_name(libfsapfs_volume_t*volume,        uint16_t*utf16_string,
           size_tutf16_string_size, libfsapfs_error_t**error);

       intlibfsapfs_volume_is_locked(libfsapfs_volume_t*volume, libfsapfs_error_t**error);

       intlibfsapfs_volume_set_utf8_password(libfsapfs_volume_t*volume,     constuint8_t*utf8_string,
           size_tutf8_string_length, libfsapfs_error_t**error);

       intlibfsapfs_volume_set_utf16_password(libfsapfs_volume_t*volume,    constuint16_t*utf16_string,
           size_tutf16_string_length, libfsapfs_error_t**error);

       intlibfsapfs_volume_set_utf8_recovery_password(libfsapfs_volume_t*volume,  constuint8_t*utf8_string,
           size_tutf8_string_length, libfsapfs_error_t**error);

       intlibfsapfs_volume_set_utf16_recovery_password(libfsapfs_volume_t*volume,  constuint16_t*utf16_string,
           size_tutf16_string_length, libfsapfs_error_t**error);

       intlibfsapfs_volume_get_root_directory(libfsapfs_volume_t*volume,   libfsapfs_file_entry_t**file_entry,
           libfsapfs_error_t**error);

       intlibfsapfs_volume_get_next_file_entry_identifier(libfsapfs_volume_t*volume,    uint64_t*identifier,
           libfsapfs_error_t**error);

       intlibfsapfs_volume_get_file_entry_by_identifier(libfsapfs_volume_t*volume,     uint64_tidentifier,
           libfsapfs_file_entry_t**file_entry, libfsapfs_error_t**error);

       intlibfsapfs_volume_get_file_entry_by_utf8_path(libfsapfs_volume_t*volume,  constuint8_t*utf8_string,
           size_tutf8_string_length, libfsapfs_file_entry_t**file_entry, libfsapfs_error_t**error);

       intlibfsapfs_volume_get_file_entry_by_utf16_path(libfsapfs_volume_t*volume, constuint16_t*utf16_string,
           size_tutf16_string_length, libfsapfs_file_entry_t**file_entry, libfsapfs_error_t**error);

       intlibfsapfs_volume_get_number_of_snapshots(libfsapfs_volume_t*volume,     int*number_of_snapshots,
           libfsapfs_error_t**error);

       intlibfsapfs_volume_get_snapshot_by_index(libfsapfs_volume_t*volume,       intsnapshot_index,
           libfsapfs_snapshot_t**snapshot, libfsapfs_error_t**error);

       Snapshot functions

       intlibfsapfs_snapshot_free(libfsapfs_snapshot_t**snapshot, libfsapfs_error_t**error);

       intlibfsapfs_snapshot_get_utf8_name_size(libfsapfs_snapshot_t*snapshot,    size_t*utf8_string_size,
           libfsapfs_error_t**error);

       intlibfsapfs_snapshot_get_utf8_name(libfsapfs_snapshot_t*snapshot,       uint8_t*utf8_string,
           size_tutf8_string_size, libfsapfs_error_t**error);

       intlibfsapfs_snapshot_get_utf16_name_size(libfsapfs_snapshot_t*snapshot,    size_t*utf16_string_size,
           libfsapfs_error_t**error);

       intlibfsapfs_snapshot_get_utf16_name(libfsapfs_snapshot_t*snapshot,      uint16_t*utf16_string,
           size_tutf16_string_size, libfsapfs_error_t**error);

       File entry functions

       intlibfsapfs_file_entry_free(libfsapfs_file_entry_t**file_entry, libfsapfs_error_t**error);

       intlibfsapfs_file_entry_get_identifier(libfsapfs_file_entry_t*file_entry,     uint64_t*identifier,
           libfsapfs_error_t**error);

       intlibfsapfs_file_entry_get_parent_identifier(libfsapfs_file_entry_t*file_entry,
           uint64_t*parent_identifier, libfsapfs_error_t**error);

       intlibfsapfs_file_entry_get_parent_file_entry(libfsapfs_file_entry_t*file_entry,
           libfsapfs_file_entry_t**parent_file_entry, libfsapfs_error_t**error);

       intlibfsapfs_file_entry_get_creation_time(libfsapfs_file_entry_t*file_entry,    int64_t*posix_time,
           libfsapfs_error_t**error);

       intlibfsapfs_file_entry_get_modification_time(libfsapfs_file_entry_t*file_entry,   int64_t*posix_time,
           libfsapfs_error_t**error);

       intlibfsapfs_file_entry_get_access_time(libfsapfs_file_entry_t*file_entry,     int64_t*posix_time,
           libfsapfs_error_t**error);

       intlibfsapfs_file_entry_get_inode_change_time(libfsapfs_file_entry_t*file_entry,   int64_t*posix_time,
           libfsapfs_error_t**error);

       intlibfsapfs_file_entry_get_added_time(libfsapfs_file_entry_t*file_entry,     int64_t*posix_time,
           libfsapfs_error_t**error);

       intlibfsapfs_file_entry_get_file_mode(libfsapfs_file_entry_t*file_entry,      uint16_t*file_mode,
           libfsapfs_error_t**error);

       intlibfsapfs_file_entry_get_number_of_links(libfsapfs_file_entry_t*file_entry,  uint32_t*number_of_links,
           libfsapfs_error_t**error);

       intlibfsapfs_file_entry_get_owner_identifier(libfsapfs_file_entry_t*file_entry, uint32_t*owner_identifier,
           libfsapfs_error_t**error);

       intlibfsapfs_file_entry_get_group_identifier(libfsapfs_file_entry_t*file_entry, uint32_t*group_identifier,
           libfsapfs_error_t**error);

       intlibfsapfs_file_entry_get_device_identifier(libfsapfs_file_entry_t*file_entry,
           uint32_t*device_identifier, libfsapfs_error_t**error);

       intlibfsapfs_file_entry_get_device_number(libfsapfs_file_entry_t*file_entry, uint32_t*major_device_number,
           uint32_t*minor_device_number, libfsapfs_error_t**error);

       intlibfsapfs_file_entry_get_utf8_name_size(libfsapfs_file_entry_t*file_entry,  size_t*utf8_string_size,
           libfsapfs_error_t**error);

       intlibfsapfs_file_entry_get_utf8_name(libfsapfs_file_entry_t*file_entry,     uint8_t*utf8_string,
           size_tutf8_string_size, libfsapfs_error_t**error);

       intlibfsapfs_file_entry_get_utf16_name_size(libfsapfs_file_entry_t*file_entry,  size_t*utf16_string_size,
           libfsapfs_error_t**error);

       intlibfsapfs_file_entry_get_utf16_name(libfsapfs_file_entry_t*file_entry,    uint16_t*utf16_string,
           size_tutf16_string_size, libfsapfs_error_t**error);

       intlibfsapfs_file_entry_get_utf8_symbolic_link_target_size(libfsapfs_file_entry_t*file_entry,
           size_t*utf8_string_size, libfsapfs_error_t**error);

       intlibfsapfs_file_entry_get_utf8_symbolic_link_target(libfsapfs_file_entry_t*file_entry,
           uint8_t*utf8_string, size_tutf8_string_size, libfsapfs_error_t**error);

       intlibfsapfs_file_entry_get_utf16_symbolic_link_target_size(libfsapfs_file_entry_t*file_entry,
           size_t*utf16_string_size, libfsapfs_error_t**error);

       intlibfsapfs_file_entry_get_utf16_symbolic_link_target(libfsapfs_file_entry_t*file_entry,
           uint16_t*utf16_string, size_tutf16_string_size, libfsapfs_error_t**error);

       intlibfsapfs_file_entry_get_number_of_extended_attributes(libfsapfs_file_entry_t*file_entry,
           int*number_of_extended_attributes, libfsapfs_error_t**error);

       intlibfsapfs_file_entry_get_extended_attribute_by_index(libfsapfs_file_entry_t*file_entry,
           intextended_attribute_index,       libfsapfs_extended_attribute_t**extended_attribute,
           libfsapfs_error_t**error);

       intlibfsapfs_file_entry_has_extended_attribute_by_utf8_name(libfsapfs_file_entry_t*file_entry,
           constuint8_t*utf8_string, size_tutf8_string_length, libfsapfs_error_t**error);

       intlibfsapfs_file_entry_has_extended_attribute_by_utf16_name(libfsapfs_file_entry_t*file_entry,
           constuint16_t*utf16_string, size_tutf16_string_length, libfsapfs_error_t**error);

       intlibfsapfs_file_entry_get_extended_attribute_by_utf8_name(libfsapfs_file_entry_t*file_entry,
           constuint8_t*utf8_string,             size_tutf8_string_length,
           libfsapfs_extended_attribute_t**extended_attribute, libfsapfs_error_t**error);

       intlibfsapfs_file_entry_get_extended_attribute_by_utf16_name(libfsapfs_file_entry_t*file_entry,
           constuint16_t*utf16_string,            size_tutf16_string_length,
           libfsapfs_extended_attribute_t**extended_attribute, libfsapfs_error_t**error);

       intlibfsapfs_file_entry_get_number_of_sub_file_entries(libfsapfs_file_entry_t*file_entry,
           int*number_of_sub_file_entries, libfsapfs_error_t**error);

       intlibfsapfs_file_entry_get_sub_file_entry_by_index(libfsapfs_file_entry_t*file_entry,
           intsub_file_entry_index, libfsapfs_file_entry_t**sub_file_entry, libfsapfs_error_t**error);

       intlibfsapfs_file_entry_get_sub_file_entry_by_utf8_name(libfsapfs_file_entry_t*file_entry,
           constuint8_t*utf8_string,  size_tutf8_string_length,  libfsapfs_file_entry_t**sub_file_entry,
           libfsapfs_error_t**error);

       intlibfsapfs_file_entry_get_sub_file_entry_by_utf16_name(libfsapfs_file_entry_t*file_entry,
           constuint16_t*utf16_string, size_tutf16_string_length,  libfsapfs_file_entry_t**sub_file_entry,
           libfsapfs_error_t**error);

       ssize_tlibfsapfs_file_entry_read_buffer(libfsapfs_file_entry_t*file_entry,  void*buffer, size_tbuffer_size,
           libfsapfs_error_t**error);

       ssize_tlibfsapfs_file_entry_read_buffer_at_offset(libfsapfs_file_entry_t*file_entry,     void*buffer,
           size_tbuffer_size, off64_toffset, libfsapfs_error_t**error);

       off64_tlibfsapfs_file_entry_seek_offset(libfsapfs_file_entry_t*file_entry,   off64_toffset,   intwhence,
           libfsapfs_error_t**error);

       intlibfsapfs_file_entry_get_offset(libfsapfs_file_entry_t*file_entry,        off64_t*offset,
           libfsapfs_error_t**error);

       intlibfsapfs_file_entry_get_size(libfsapfs_file_entry_t*file_entry,         size64_t*size,
           libfsapfs_error_t**error);

       intlibfsapfs_file_entry_get_number_of_extents(libfsapfs_file_entry_t*file_entry,  int*number_of_extents,
           libfsapfs_error_t**error);

       intlibfsapfs_file_entry_get_extent_by_index(libfsapfs_file_entry_t*file_entry,     intextent_index,
           off64_t*extent_offset, size64_t*extent_size, uint32_t*extent_flags, libfsapfs_error_t**error);

       Extended attribute functions

       intlibfsapfs_extended_attribute_free(libfsapfs_extended_attribute_t**extended_attribute,
           libfsapfs_error_t**error);

       intlibfsapfs_extended_attribute_get_identifier(libfsapfs_extended_attribute_t*extended_attribute,
           uint64_t*identifier, libfsapfs_error_t**error);

       intlibfsapfs_extended_attribute_get_utf8_name_size(libfsapfs_extended_attribute_t*extended_attribute,
           size_t*utf8_string_size, libfsapfs_error_t**error);

       intlibfsapfs_extended_attribute_get_utf8_name(libfsapfs_extended_attribute_t*extended_attribute,
           uint8_t*utf8_string, size_tutf8_string_size, libfsapfs_error_t**error);

       intlibfsapfs_extended_attribute_get_utf16_name_size(libfsapfs_extended_attribute_t*extended_attribute,
           size_t*utf16_string_size, libfsapfs_error_t**error);

       intlibfsapfs_extended_attribute_get_utf16_name(libfsapfs_extended_attribute_t*extended_attribute,
           uint16_t*utf16_string, size_tutf16_string_size, libfsapfs_error_t**error);

       ssize_tlibfsapfs_extended_attribute_read_buffer(libfsapfs_extended_attribute_t*extended_attribute,
           void*buffer, size_tbuffer_size, libfsapfs_error_t**error);

       ssize_tlibfsapfs_extended_attribute_read_buffer_at_offset(libfsapfs_extended_attribute_t*extended_attribute,
           void*buffer, size_tbuffer_size, off64_toffset, libfsapfs_error_t**error);

       off64_tlibfsapfs_extended_attribute_seek_offset(libfsapfs_extended_attribute_t*extended_attribute,
           off64_toffset, intwhence, libfsapfs_error_t**error);

       intlibfsapfs_extended_attribute_get_offset(libfsapfs_extended_attribute_t*extended_attribute,
           off64_t*offset, libfsapfs_error_t**error);

       intlibfsapfs_extended_attribute_get_size(libfsapfs_extended_attribute_t*extended_attribute, size64_t*size,
           libfsapfs_error_t**error);

       intlibfsapfs_extended_attribute_get_number_of_extents(libfsapfs_extended_attribute_t*extended_attribute,
           int*number_of_extents, libfsapfs_error_t**error);

       intlibfsapfs_extended_attribute_get_extent_by_index(libfsapfs_extended_attribute_t*extended_attribute,
           intextent_index,   off64_t*extent_offset,   size64_t*extent_size,   uint32_t*extent_flags,
           libfsapfs_error_t**error);

See Also