Syntax
#include <stdlib.h> char *_fullpath(char *pathbuf, char *partialpath, size_t n);Description
If pathbuf is NULL, _fullpath uses malloc to allocate a buffer of size _MAX_PATH bytes to store the path name.
Value
#include <stdio.h>#include <stdlib.h>
#include <errno.h>
int main(void)
{
   char *retBuffer;
   retBuffer = _fullpath(NULL, ".", 0);
   if (NULL == retBuffer) {
      printf("An error has occurred, errno is set to %d.\n", errno);
   }
   else
      printf("Full path name of current directory is %s.\n", retBuffer);
   return 0;
   /****************************************************************************
      The output should be similar to:
        Full path name of current directory is D:\BIN.
   ****************************************************************************/
}
Related Information