Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Microsoft C 6.0 - <b>_fullpath() get full pathname</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 _fullpath()             Get Full Pathname

 #include   <stdlib.h>

 char *_fullpath(buffer, pathname, maxlen);
 char *buffer;                  User path name buffer
 char *pathname;                Path name fragment
 size_t maxlen;                 Maximum length of buffer

    _fullpath() converts the partial path stored in pathname to a
    fully qualified path that is stored in buffer. If the
    pathname argument specifies a disk drive, the current
    directory of the drive is combined with the path. The _fullpath()
    function does not check for validity of the drive or directory.

    Returns:    A pointer to the absolute path in buffer; NULL if
                there was an error.

    Notes:          Unlike _makepath, the _fullpath routine can be
                    used with .\ and ..\ in the path.

 Portability:   Not supported by the ANSI standard.

   -------------------------------- Example ---------------------------------

        #include <stdio.h>
        #include <conio.h>
        #include <stdlib.h>
        #include <direct.h>

        char fullp[_MAX_PATH], partp[_MAX_PATH];

        void main()
        {
                printf("Enter partial path: ");
                gets(partp);
                _fullpath(fullp, partp, _MAX_PATH);
                printf("The full path: %s\n", fullp);
        }

See Also: _getdcwd() _makepath() _splitpath()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson