Component index
Section index

Component walkfs


Search

Type

Function

Summary

Browse a file system recusivly

Description

For each file seen onefile() is called. For evevy sub-directory seen, recurse() is called to get permission to go deeper.

void onefile (const char *path, const char *basename, const char *relpath, int depth)
bool recurse (const char *dir, const char *basename, const char *relpath, int depth)

Examples

sample / walkfs component

Prototypes

int walkfs (const char *dirpath)

Return -1 if any error

Functags

void onefile (const char *path, const char *basename, const char *relpath, int depth) Mandatory

Called for every file and directory found

bool recurse (const char *dir, const char *basename, const char *relpath, int depth) Optional

Is called whenever a sub-directory is seen

The function returns true if walkfs is allowed to go deeper. The default for this functag is to allow recusion.

Fhelpers

void end ()

Request walkfs to end