filename.h File Reference

File names related operation. More...

`#include <sphinxbase/sphinxbase_export.h>`
`#include <sphinxbase/prim_type.h>`

Go to the source code of this file.

## Functions

SPHINXBASE_EXPORT void | path2basename (const char *path, char *base)
| Strip off leading path components from the given path and copy the base into base. More...
SPHINXBASE_EXPORT void | path2dirname (const char *path, char *dir)
| Strip off filename from the given path and copy the directory name into dir Caller must have allocated dir (hint: it's always shorter than path).
SPHINXBASE_EXPORT void | strip_fileext (const char *file, char *root)
| Strip off the smallest trailing file-extension suffix and copy the rest into the given root argument. More...
SPHINXBASE_EXPORT int | path_is_absolute (const char *file)
| Test whether a pathname is absolute for the current OS.

## Detailed Description

File names related operation.

Definition in file filename.h.

## Function Documentation

SPHINXBASE_EXPORT void path2basename | ( | const char * | path,
|  | char * | base
| ) |  |

Strip off leading path components from the given path and copy the base into base.

Caller must have allocated base (hint: it's always shorter than path).

Definition at line 75 of file filename.c.

SPHINXBASE_EXPORT void strip_fileext | ( | const char * | file,
|  | char * | root
| ) |  |

Strip off the smallest trailing file-extension suffix and copy the rest into the given root argument.

Caller must have allocated root.

Definition at line 111 of file filename.c.