* * $Log: dirname.c,v $ * Revision 1.1 2006/08/01 07:42:56 haraldkipp * New functions extract last component and parent directory from pathnames. * * *
#include <errno.h>
#include <libgen.h>
#include <stdlib.h>
#include <string.h>
Defines | |
#define | MAXPATHLEN 256 |
Functions | |
char * | dirname (CONST char *path) |
Extract the directory part of a given pathname. |
char* dirname | ( | CONST char * | path | ) |
Extract the directory part of a given pathname.
This is the converse of basename().
path | Pointer to the pathname. |