1glob.h(0P)                 POSIX Programmer's Manual                glob.h(0P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10
11

NAME

13       glob.h — pathname pattern-matching types
14

SYNOPSIS

16       #include <glob.h>
17

DESCRIPTION

19       The <glob.h> header shall define the structures and symbolic  constants
20       used by the glob() function.
21
22       The <glob.h> header shall define the glob_t structure type, which shall
23       include at least the following members:
24
25           size_t   gl_pathc Count of paths matched by pattern.
26           char   **gl_pathv Pointer to a list of matched pathnames.
27           size_t   gl_offs  Slots to reserve at the beginning of gl_pathv.
28
29       The <glob.h> header shall  define  the  size_t  type  as  described  in
30       <sys/types.h>.
31
32       The  <glob.h>  header  shall define the following symbolic constants as
33       values for the flags argument:
34
35       GLOB_APPEND   Append generated pathnames to those previously obtained.
36
37       GLOB_DOOFFS   Specify how many null pointers to add to the beginning of
38                     gl_pathv.
39
40       GLOB_ERR      Cause glob() to return on error.
41
42       GLOB_MARK     Each  pathname  that  is a directory that matches pattern
43                     has a <slash> appended.
44
45       GLOB_NOCHECK  If pattern does not match any  pathname,  then  return  a
46                     list consisting of only pattern.
47
48       GLOB_NOESCAPE Disable backslash escaping.
49
50       GLOB_NOSORT   Do not sort the pathnames returned.
51
52       The  <glob.h>  header  shall define the following symbolic constants as
53       error return values:
54
55       GLOB_ABORTED  The  scan  was  stopped  because  GLOB_ERR  was  set   or
56                     (*errfunc)() returned non-zero.
57
58       GLOB_NOMATCH  The  pattern  does  not  match any existing pathname, and
59                     GLOB_NOCHECK was not set in flags.
60
61       GLOB_NOSPACE  An attempt to allocate memory failed.
62
63       The following shall be declared as functions and may also be defined as
64       macros. Function prototypes shall be provided.
65
66           int  glob(const char *restrict, int, int(*)(const char *, int),
67                    glob_t *restrict);
68           void globfree(glob_t *);
69
70       The following sections are informative.
71

APPLICATION USAGE

73       None.
74

RATIONALE

76       None.
77

FUTURE DIRECTIONS

79       None.
80

SEE ALSO

82       <sys_types.h>
83
84       The System Interfaces volume of POSIX.1‐2008, glob()
85
87       Portions  of  this text are reprinted and reproduced in electronic form
88       from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
89       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
90       Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
91       cal  and  Electronics  Engineers,  Inc  and  The  Open Group.  (This is
92       POSIX.1-2008 with the 2013 Technical Corrigendum  1  applied.)  In  the
93       event of any discrepancy between this version and the original IEEE and
94       The Open Group Standard, the original IEEE and The Open Group  Standard
95       is  the  referee document. The original Standard can be obtained online
96       at http://www.unix.org/online.html .
97
98       Any typographical or formatting errors that appear  in  this  page  are
99       most likely to have been introduced during the conversion of the source
100       files to man page format. To report such errors,  see  https://www.ker
101       nel.org/doc/man-pages/reporting_bugs.html .
102
103
104
105IEEE/The Open Group                  2013                           glob.h(0P)
Impressum