#include <fnmatch.h>

fnmatch.h

includes: _bounds.h, sys/cdefs.h
9 macros · 1 function

macroFNM_NOMATCH

#define FNM_NOMATCH 1
Match failed.

macroFNM_NOESCAPE

#define FNM_NOESCAPE 0x01
Disable backslash escaping.

macroFNM_PATHNAME

#define FNM_PATHNAME 0x02
Slash must be matched by slash.

macroFNM_PERIOD

#define FNM_PERIOD 0x04
Period must be matched by period.

macroFNM_NOSYS

#define FNM_NOSYS (-1)
Reserved.

macroFNM_LEADING_DIR

#define FNM_LEADING_DIR 0x08
Ignore /<tail> after Imatch.

macroFNM_CASEFOLD

#define FNM_CASEFOLD 0x10
Case insensitive search.

macroFNM_IGNORECASE

#define FNM_IGNORECASE FNM_CASEFOLD

macroFNM_FILE_NAME

#define FNM_FILE_NAME FNM_PATHNAME

functionfnmatch

__DARWIN_ALIAS(fnmatch)
int fnmatch(const char *, const char *, int)
man page · April 7, 2025
fnmatch(3) — test whether a filename or pathname matches a shell-style pattern