BRL-CAD
Loading...
Searching...
No Matches
bu_glob_context Struct Reference

#include <glob.h>

Collaboration diagram for bu_glob_context:
[legend]

Data Fields

int gl_flags
 
int gl_pathc
 
int gl_matchc
 
struct bu_vls ** gl_pathv
 
void *(* gl_opendir )(const char *path, void *data)
 
int(* gl_readdir )(struct bu_dirent *de, void *dirhandle)
 
void(* gl_closedir )(void *dirhandle)
 
int(* gl_lstat )(const char *path, struct bu_stat *sb, void *data)
 
int(* gl_stat )(const char *path, struct bu_stat *sb, void *data)
 
int(* gl_errfunc )(const char *path, int errnum, void *data)
 
voiddata
 
struct bu_glob_ctx_impli
 

Detailed Description

Definition at line 81 of file glob.h.

Field Documentation

◆ gl_flags

int gl_flags

flags customising globbing behaviour

Definition at line 86 of file glob.h.

◆ gl_pathc

int gl_pathc

total number of matched paths

Definition at line 90 of file glob.h.

◆ gl_matchc

int gl_matchc

number of paths matched by this call

Definition at line 91 of file glob.h.

◆ gl_pathv

struct bu_vls** gl_pathv

NULL-terminated array of matched paths

Definition at line 92 of file glob.h.

◆ gl_opendir

void *(* gl_opendir) (const char *path, void *data)

Open the directory at path using backend-specific data data. Returns an opaque handle passed back to gl_readdir / gl_closedir, or NULL on failure.

Definition at line 107 of file glob.h.

◆ gl_readdir

int(* gl_readdir) (struct bu_dirent *de, void *dirhandle)

Read the next entry from a directory handle obtained via gl_opendir. Fills de->name with the entry name. Returns 0 on success, non-zero when there are no more entries.

Definition at line 114 of file glob.h.

◆ gl_closedir

void(* gl_closedir) (void *dirhandle)

Close and free a directory handle obtained via gl_opendir.

Definition at line 119 of file glob.h.

◆ gl_lstat

int(* gl_lstat) (const char *path, struct bu_stat *sb, void *data)

Stat a path (do not follow symlinks, i.e. lstat semantics). Returns 0 on success, -1 on failure.

Definition at line 125 of file glob.h.

◆ gl_stat

int(* gl_stat) (const char *path, struct bu_stat *sb, void *data)

Stat a path (follow symlinks, i.e. stat semantics). Returns 0 on success, -1 on failure.

Definition at line 131 of file glob.h.

◆ gl_errfunc

int(* gl_errfunc) (const char *path, int errnum, void *data)

Called on directory-open errors. Receives the path, errno value, and the context data pointer. Return non-zero to abort the glob.

Definition at line 140 of file glob.h.

◆ data

void* data

Passed verbatim to every callback as described above.

Definition at line 144 of file glob.h.

◆ i

struct bu_glob_ctx_impl* i

Implementation details; do not use directly.

Definition at line 148 of file glob.h.


The documentation for this struct was generated from the following file: