table of contents
libcfile(3) | Library Functions Manual | libcfile(3) |
NAME¶
libcfile.h
—
Library to support cross-platform C file
functions
SYNOPSIS¶
#include
<libcfile.h>
Support functions
const char *
libcfile_get_version
(void);
int
libcfile_get_codepage
(int
*codepage,
libcfile_error_t
**error);
int
libcfile_set_codepage
(int
codepage,
libcfile_error_t
**error);
int
libcfile_file_exists
(const
char *filename,
libcfile_error_t
**error);
int
libcfile_file_remove
(const
char *filename,
libcfile_error_t
**error);
int
libcfile_file_remove_with_error_code
(const
char *filename, uint32_t
*error_code,
libcfile_error_t
**error);
Available when compiled with wide character string support:
int
libcfile_file_exists_wide
(const
wchar_t *filename,
libcfile_error_t
**error);
int
libcfile_file_remove_wide
(const
wchar_t *filename,
libcfile_error_t
**error);
int
libcfile_file_remove_wide_with_error_code
(const
wchar_t *filename,
uint32_t *error_code,
libcfile_error_t
**error);
Notify functions
void
libcfile_notify_set_verbose
(int
verbose);
int
libcfile_notify_set_stream
(FILE
*stream, libcfile_error_t
**error);
int
libcfile_notify_stream_open
(const
char *filename,
libcfile_error_t
**error);
int
libcfile_notify_stream_close
(libcfile_error_t
**error);
Error functions
void
libcfile_error_free
(libcfile_error_t
**error);
int
libcfile_error_fprint
(libcfile_error_t
*error, FILE
*stream);
int
libcfile_error_sprint
(libcfile_error_t
*error, char
*string, size_t
size);
int
libcfile_error_backtrace_fprint
(libcfile_error_t
*error, FILE
*stream);
int
libcfile_error_backtrace_sprint
(libcfile_error_t
*error, char
*string, size_t
size);
File functions
int
libcfile_file_initialize
(libcfile_file_t
**file, libcfile_error_t
**error);
int
libcfile_file_free
(libcfile_file_t
**file, libcfile_error_t
**error);
int
libcfile_file_open
(libcfile_file_t
*file, const char
*filename, int
access_flags,
libcfile_error_t
**error);
int
libcfile_file_open_with_error_code
(libcfile_file_t
*file, const char
*filename, int
access_flags, uint32_t
*error_code,
libcfile_error_t
**error);
int
libcfile_file_close
(libcfile_file_t
*file, libcfile_error_t
**error);
ssize_t
libcfile_file_read_buffer
(libcfile_file_t
*file, uint8_t
*buffer, size_t
size, libcfile_error_t
**error);
ssize_t
libcfile_file_read_buffer_with_error_code
(libcfile_file_t
*file, uint8_t
*buffer, size_t
size, uint32_t
*error_code,
libcfile_error_t
**error);
ssize_t
libcfile_file_write_buffer
(libcfile_file_t
*file, const uint8_t
*buffer, size_t
size, libcfile_error_t
**error);
ssize_t
libcfile_file_write_buffer_with_error_code
(libcfile_file_t
*file, const uint8_t
*buffer, size_t
size, uint32_t
*error_code,
libcfile_error_t
**error);
off64_t
libcfile_file_seek_offset
(libcfile_file_t
*file, off64_t
offset, int whence,
libcfile_error_t
**error);
int
libcfile_file_resize
(libcfile_file_t
*file, size64_t
size, libcfile_error_t
**error);
int
libcfile_file_is_open
(libcfile_file_t
*file, libcfile_error_t
**error);
int
libcfile_file_get_offset
(libcfile_file_t
*file, off64_t
*offset, libcfile_error_t
**error);
int
libcfile_file_get_size
(libcfile_file_t
*file, size64_t
*size, libcfile_error_t
**error);
int
libcfile_file_is_device
(libcfile_file_t
*file, libcfile_error_t
**error);
ssize_t
libcfile_file_io_control_read
(libcfile_file_t
*file, uint32_t
control_code, uint8_t
*control_data, size_t
control_data_size,
uint8_t *data,
size_t data_size,
libcfile_error_t
**error);
ssize_t
libcfile_file_io_control_read_with_error_code
(libcfile_file_t
*file, uint32_t
control_code, uint8_t
*control_data, size_t
control_data_size,
uint8_t *data,
size_t data_size,
uint32_t *error_code,
libcfile_error_t
**error);
int
libcfile_file_set_access_behavior
(libcfile_file_t
*file, int
access_behavior,
libcfile_error_t
**error);
int
libcfile_file_set_block_size
(libcfile_file_t
*file, size_t
block_size,
libcfile_error_t
**error);
Available when compiled with wide character string support:
int
libcfile_file_open_wide
(libcfile_file_t
*file, const wchar_t
*filename, int
access_flags,
libcfile_error_t
**error);
int
libcfile_file_open_wide_with_error_code
(libcfile_file_t
*file, const wchar_t
*filename, int
access_flags, uint32_t
*error_code,
libcfile_error_t
**error);
DESCRIPTION¶
The
libcfile_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 "libcfile.h".
ENVIRONMENT¶
None
FILES¶
None
NOTES¶
libcfile can be compiled with wide character support (wchar_t).
To compile libcfile with wide character support use:
./configure --enable-wide-character-type=yes
or define: _UNICODE
or UNICODE
during compilation.
LIBCFILE_WIDE_CHARACTER_TYPE
in libcfile/features.h can be used to determine if libcfile was compiled with
wide character support.
BUGS¶
Please report bugs of any kind on the project issue tracker: https://github.com/libyal/libcfile/issues
AUTHOR¶
These man pages are generated from "libcfile.h".
COPYRIGHT¶
Copyright (C) 2008-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 libcfile.h include file
February 28, 2019 | libcfile |