Extracts the directory part of a pathname. More...
#include <errno.h>
#include <libgen.h>
#include <stdlib.h>
#include <string.h>
#include <memdebug.h>
Defines | |
#define | MAXPATHLEN 256 |
Functions | |
char * | dirname (const char *path) |
Extract the directory part of a given pathname. |
Extracts the directory part of a pathname.
* * $Log$ * Revision 1.2 2009/02/13 14:52:05 haraldkipp * Include memdebug.h for heap management debugging support. * * Revision 1.1 2006/08/01 07:42:56 haraldkipp * New functions extract last component and parent directory from pathnames. * * *
#define MAXPATHLEN 256 |
Referenced by dirname().
char* dirname | ( | const char * | path | ) |
Extract the directory part of a given pathname.
This is the converse of basename().
path | Pointer to the pathname. |
References ENAMETOOLONG, errno, malloc(), MAXPATHLEN, NULL, strcpy(), strlen(), and strncpy().