Reference

Basics

These are some basic, helpful functions available in the library. The basename is the last portion of the path which determines the name of the file or folder which is being pointed to. For instance, the path /var/log/test.txt would have the basename test.txt. The dirname is the opposite - the path up to the basename. In that example the dirname would be /var/log.

Functions

One might specify paths containing relative components ../. These functions help to resolve or create relative paths based on a base path.

Functions

Extensions

Extensions are the portion of a path which come after a .. For instance, the file extension of the /var/log/test.txt would be .txt - which indicates that the content is text.

Functions

Segments

A segment represents a single component of a path. For instance, on linux a path might look like this /var/log/, which consists of two segments var and log.

Functions

Style

The path style describes how paths are generated and parsed. cwalk currently supports two path styles, CWK_STYLE_WINDOWS and CWK_STYLE_UNIX.

Functions