1glob.h(3HEAD) Headers glob.h(3HEAD)
2
3
4
6 glob.h, glob - pathname pattern-matching types
7
9 #include <glob.h>
10
11
13 The <glob.h> header defines the structures and symbolic constants used
14 by the glob(3C).
15
16
17 The structure type glob_t contains the following members:
18
19 size_t gl_pathc /* count of paths matched by pattern */
20 char **gl_pathv /* pointer to a list of matched
21 pathnames */
22 size_t gl_offs /* lots to reserve at the beginning
23 of gl_pathv */
24
25
26
27 The following constants are provided as values for the flags argument:
28
29 GLOB_APPEND Append generated pathnames to those previously
30 obtained.
31
32
33 GLOB_DOOFFS Specify how many null pointers to add to the beginning
34 of gl_pathv.
35
36
37 GLOB_ERR Cause glob() to return on error.
38
39
40 GLOB_MARK Each pathname that is a directory that matches pattern
41 has a slash appended.
42
43
44 GLOB_NOCHECK If pattern does not match any pathname, then return a
45 list consisting of only pattern.
46
47
48 GLOB_NOESCAPE Disable backslash escaping.
49
50
51 GLOB_NOSORT Do not sort the pathnames returned.
52
53
54
55 The following constants are defined as error return values:
56
57 GLOB_ABORTED The scan was stopped because GLOB_ERR was set or
58 (*errfunc)() returned non-zero.
59
60
61 GLOB_NOMATCH The pattern does not match any existing pathname, and
62 GLOB_NOCHECK was not set in flags.
63
64
65 GLOB_NOSPACE An attempt to allocate memory failed.
66
67
68 GLOB_NOSYS Reserved.
69
70
72 See attributes(5) for descriptions of the following attributes:
73
74
75
76
77 ┌─────────────────────────────┬─────────────────────────────┐
78 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
79 ├─────────────────────────────┼─────────────────────────────┤
80 │Interface Stability │Standard │
81 └─────────────────────────────┴─────────────────────────────┘
82
84 glob(3C), attributes(5), standards(5)
85
86
87
88SunOS 5.11 10 Sep 2004 glob.h(3HEAD)