ABSPATH(3)
π NAME π
okay so this is ABSPATH(3), straight outta SchilyΒ΄s LIBRARY FUNCTIONS, and it's giving absolute-path glow-up energy β¨. The trio abspath(), absnpath(), and absfpath() β they expand a relative pathname to a full (absolute) pathname. periodt.
π SYNOPSIS π
#include <schily/schily.h>
char *
abspath(relp, absp, asize)
const char *relp;
char *absp;
size_t asize;
char *
absnpath(relp, absp, asize)
const char *relp;
char *absp;
size_t asize;
char *
absfpath(relp, absp, asize, flags)
const char *relp;
char *absp;
size_t asize;
int flags;
π¦ DESCRIPTION π¦
abspath() takes a relative path name and converts it into an absolute path name. So iconic. Here's the input/output tea:
relpβ the relative path name used as the input.abspβ the buffer used for the result of the conversion.asizeβ the size of the result buffer.
absnpath() behaves like abspath() except that the file does not need to exist. lowkey helpful.
absfpath() takes an additional flags parameter from the set of flags from resolvefpath() to control the behavior. iykyk.
π RETURN VALUE π
On successful completion, abspath(), absnpath(), and absfpath() return a pointer to the resolved name absp. Otherwise, a null pointer is returned and errno is set to indicate the error, and the contents of the buffer pointed to by absp is left in an indeterminate state. not the buffer being left indeterminate π.
π ERRORS π
ERANGEβ the path does not fit into the suplied buffer.EFAULTβ a null pointer was suplied as the pathname.EINVALβ an empty relative path was supplied.
π SEE ALSO π
resolvepath(3), resolvenpath(3), resolvefpath(3)
made with π by Joerg Schilling, 2022/09/09 β thatβs the source/version and date footer sign-off, bestie π«Ά
π¦ where this page comes from
- opensuse-leap 16.0: libschily-devel-doc 2022.10.16-160000.2.2 Β· CDDL-1.0
- Copyright 2015 J. Schilling
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms