The manual
ginnOS
The reference: libc, the libraries and the kernel
Loading...
Searching...
No Matches
libgen.h File Reference

the parts of a path. More...

Go to the source code of this file.

Functions

char * basename (char *path)
 the last part: "/usr/lib/" gives "lib"
char * dirname (char *path)
 all but the last part: "/usr/lib/" gives "/usr", "file" gives "."

Detailed Description

the parts of a path.

both may change path, and both may return a static string (".", "/").

Function Documentation

◆ basename()

char * basename ( char * path)

the last part: "/usr/lib/" gives "lib"

◆ dirname()

char * dirname ( char * path)

all but the last part: "/usr/lib/" gives "/usr", "file" gives "."