table of contents
libcpath(3) | Library Functions Manual | libcpath(3) |
NAME¶
libcpath.h
—
Library to support cross-platform C path
functions
SYNOPSIS¶
#include
<libcpath.h>
Support functions
const char *
libcpath_get_version
(void);
int
libcpath_get_codepage
(int
*codepage,
libcpath_error_t
**error);
int
libcpath_set_codepage
(int
codepage,
libcpath_error_t
**error);
Error functions
void
libcpath_error_free
(libcpath_error_t
**error);
int
libcpath_error_fprint
(libcpath_error_t
*error, FILE
*stream);
int
libcpath_error_sprint
(libcpath_error_t
*error, char
*string, size_t
size);
int
libcpath_error_backtrace_fprint
(libcpath_error_t
*error, FILE
*stream);
int
libcpath_error_backtrace_sprint
(libcpath_error_t
*error, char
*string, size_t
size);
Path functions
int
libcpath_path_change_directory
(const
char *directory_name,
libcpath_error_t
**error);
int
libcpath_path_get_current_working_directory
(char
**current_working_directory,
size_t
*current_working_directory_size,
libcpath_error_t
**error);
int
libcpath_path_get_full_path
(const
char *path, size_t
path_length, char
**full_path, size_t
*full_path_size,
libcpath_error_t
**error);
int
libcpath_path_get_sanitized_filename
(const
char *filename, size_t
filename_length, char
**sanitized_filename,
size_t
*sanitized_filename_size,
libcpath_error_t
**error);
int
libcpath_path_get_sanitized_path
(const
char *path, size_t
path_length, char
**sanitized_path, size_t
*sanitized_path_size,
libcpath_error_t
**error);
int
libcpath_path_join
(char
**path, size_t
*path_size, const char
*directory_name, size_t
directory_name_length,
const char *filename,
size_t filename_length,
libcpath_error_t
**error);
int
libcpath_path_make_directory
(const
char *directory_name,
libcpath_error_t
**error);
Available when compiled with wide character string support:
int
libcpath_path_change_directory_wide
(const
wchar_t *directory_name,
libcpath_error_t
**error);
int
libcpath_path_get_current_working_directory_wide
(wchar_t
**current_working_directory,
size_t
*current_working_directory_size,
libcpath_error_t
**error);
int
libcpath_path_get_full_path_wide
(const
wchar_t *path, size_t
path_length, wchar_t
**full_path, size_t
*full_path_size,
libcpath_error_t
**error);
int
libcpath_path_get_sanitized_filename_wide
(const
wchar_t *filename, size_t
filename_length, wchar_t
**sanitized_filename,
size_t
*sanitized_filename_size,
libcpath_error_t
**error);
int
libcpath_path_get_sanitized_path_wide
(const
wchar_t *path, size_t
path_length, wchar_t
**sanitized_path, size_t
*sanitized_path_size,
libcpath_error_t
**error);
int
libcpath_path_join_wide
(wchar_t
**path, size_t
*path_size, const wchar_t
*directory_name, size_t
directory_name_length,
const wchar_t *filename,
size_t filename_length,
libcpath_error_t
**error);
int
libcpath_path_make_directory_wide
(const
wchar_t *directory_name,
libcpath_error_t
**error);
DESCRIPTION¶
The
libcpath_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 "libcpath.h".
ENVIRONMENT¶
None
FILES¶
None
NOTES¶
libcpath can be compiled with wide character support (wchar_t).
To compile libcpath with wide character support use:
./configure --enable-wide-character-type=yes
or define: _UNICODE
or UNICODE
during compilation.
LIBCPATH_WIDE_CHARACTER_TYPE
in libcpath/features.h can be used to determine if libcpath was compiled with
wide character support.
BUGS¶
Please report bugs of any kind on the project issue tracker: https://github.com/libyal/libcpath/issues
AUTHOR¶
These man pages are generated from "libcpath.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 libcpath.h include file
March 15, 2019 | libcpath |