libcpath(3)
π libcpath(3) β Library Functions Manual, bestie edition π
okay so welcome to the libcpath(3) page, and it is literally all about libcpath.h, the library that supports cross-platform C path functions. Itβs giving βmake paths behave across platformsβ energy, and weβre obsessed. π
β¨ NAME β¨
libcpath.h β Library to support cross-platform C path functions. No cap, thatβs the whole name section, and it ate. π
π¦ SYNOPSIS π¦
bestie, here is the entire function lineup, with every signature exactly as it appears. Do not come for me about the line breaks β this is the official shape of it:
#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. Thatβs the description, and honestly? Minimalist queen behavior. π
π 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". So yeah, check the header for the real receipts β this page is not finna guess for you. π«Ά
π ENVIRONMENT π
None β literally no environment variables here, bestie. Clean, unbothered, moisturised. π§
π FILES π
None β no files, no cap. π¦
π₯ NOTES π₯
- libcpath can be compiled with wide character support (
wchar_t). Thatβs the wide-character vibe check. - To compile libcpath with wide character support use:
./configure --enable-wide-character-type=yes
or define _UNICODE or UNICODE during compilation. Pick your fighter. β¨
LIBCPATH_WIDE_CHARACTER_TYPEinlibcpath/features.hcan be used to determine if libcpath was compiled with wide character support. iykyk.
π BUGS π
Please report bugs of any kind on the project issue tracker:
https://github.com/libyal/libcpath/issues
Not me asking you to be normal about bug reports β please do report them, though. The tracker is right there. π
π AUTHOR π
These man pages are generated from "libcpath.h". So the header is the main character here, fr fr. β
π 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. Thatβs the legal vibe, and it is serious. π
π SEE ALSO π
the libcpath.h include file β thatβs the whole see-also, bestie. Short, sweet, iconic. π
Sign-off time: this page is from libcpath, dated March 15, 2019. Stay slay, read your headers, and may all your paths be cross-platform. Mwah. ππ
π¦ where this page comes from
- opensuse-leap 16.0: libcpath-devel 20240414-bp160.1.10 Β· LGPL-3.0-or-later
- opensuse-leap 16.0: libcpath-devel 20240414-bp160.1.10 Β· LGPL-3.0-or-later
- opensuse-leap 16.0: libcpath-devel 20240414-bp160.1.10 Β· LGPL-3.0-or-later
- opensuse-leap 16.0: libcpath-devel 20240414-bp160.1.10 Β· LGPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms