|
NAMErel2abs —
make an absolute path name from a relative path name
SYNOPSISchar *rel2abs (const
char *path, const char
*base, char *result,
size_t size);
DESCRIPTIONTherel2abs () function makes an absolute path name from
a relative path name path based on a directory
base and copies the resulting path name into the memory
referenced by result. The result
argument must refer to a buffer capable of storing at least
size character
The resulting path name may include symbolic links.
RETURN VALUESTherel2abs () function returns absolute path name on
success. If an error occurs, it returns NULL .
ERRORSTherel2abs () function may fail and set the external
variable errno to indicate the error.
EXAMPLEchar result[MAXPATHLEN]; char *path = rel2abs("../../src/sys", "/usr/local/lib", result, MAXPATHLEN); yields:
Similarly,
yields:
SEE ALSOabs2rel(3)AUTHORSShigio Yamaguchi (shigio@tamacom.com)
Visit the GSP FreeBSD Man Page Interface. |