|
NAMEresolvepath(), resolvenpath(), resolvefpath() - resolve all symbolic links of a path nameSYNOPSIS#include <schily/schily.h> int resolvepath(path, buf, bufsiz) const char *path; char *buf; size_t bufsiz; int resolvenpath(path, buf, bufsiz) const char *path; char *buf; size_t bufsiz; int resolvefpath(path, buf, bufsiz, flags) const char *path; char *buf; size_t bufsiz; int flags; DESCRIPTIONresolvepath() takes a relative path name and resolves all smbolic links in the path name. The result is a path name that is free of symbolic links. path is relative path name that is used as the input. buf is the buffer used for the result of the conversion. bufsiz is the size of the result buffer.All ``.'' components are eliminated and every non-leading ``..'' component is eliminated together with its preceding directory component. If leading ``..'' components reach to the root directory, they are replaced by ``/''. resolvenpath() behaves like resolvepath() except that the file does not need to exist. resolvefpath() takes an additional flags parameter from the set of flags from the following set:
RETURN VALUEUpon successful completion, resolvepath(), resolvenpath() and resolvefpath() return the number of bytes placed in the buffer Otherwise, -1 is returned and errno is set to indicate the error. In case of an error, the contents of result buffer is left in an intermediate state.ERRORS
USAGEApplications should not assume that the returned contents of the buffer are null-terminated. This is because the function resolvepath(3) may be the Solaris version of the program is compiled on Solaris.EXAMPLESSEE ALSOresolvepath(3), resolvenpath(3), resolvefpath(3)NOTESnone
Visit the GSP FreeBSD Man Page Interface. |