Chapter Contents

Previous

Next
realpath

realpath



Return Absolute Pathname

Portability: UNIX compatible


SYNOPSIS
DESCRIPTION
RETURN VALUE
USAGE NOTES


SYNOPSIS

#include <lclib.h>
char *realpath(const char *pathname, 
               char absname[PATH_MAX+1]);


DESCRIPTION

The realpath function can be used to return a standard form of an UNIX System Services path name. The path name returned will be an absolute path name, which does not involve the "." or ".." notations or symbolic links.

The pathname argument to realpath is the UNIX System Services path name to be resolved. If the program was not compiled with the posix compiler option, pathname should begin with an hfs: style prefix.

The absname argument should be an array of PATH_MAX +1 characters, in which realpath will store the canonical form of the path name. PATH_MAX is defined in the header file <limits.h> . If the program was not compiled with the posix compiler option, the value stored will begin with an hfs: style prefix.


RETURN VALUE

realpath returns the address of the standardized path name if successful, and otherwise returns 0 .


USAGE NOTES

The realpath function can only be used with MVS 5.2.2 or a later release.


Chapter Contents

Previous

Next

Top of Page

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.