lib
Typedef PathComponentCb
in path_util.h
callback for each component in a path string.
if path is empty (i.e. ""), this is not called.
- Parameters:
component:
- 0-terminated name of the component (does not
include any trailing slash!)
is_dir
- indicates if it's a directory (i.e. is
followed by a slash in the original path).
rationale: a bool isn't as nice as a flag or enum, but vfs_tree already
has TNodeType and we don't want to expose that or create a new one.
ctx:
- context parameter that was passed to path_foreach_component.
- Returns:
- LibError; INFO::CB_CONTINUE to continue operation normally;
anything else will cause path_foreach_component to abort immediately and
return that. no need to 'abort' (e.g. return INFO::OK) after a filename is
encountered - that's taken care of automatically.
PathComponentCb
public typedef LibError ( * PathComponentCb )( const char* component, bool is_dir, void* ctx );