fnmatch

Filename Pattern Matching

Functions

FunctionDescription
_fnm_byte_atInternal byte reader.
_fnm_matchInternal: recursive match helper. Returns 1 if pat[pi..] matches name[ni..].
fnmatchMatch a filename against a glob pattern. Returns 1 if matches.
fnmatch_has_magicCheck if pattern contains glob special characters (*, ?, [).
fnmatch_escapeEscape glob special characters in a path. Returns length written.

Details

_fnm_byte_at

fn _fnm_byte_at(buf: &i8, idx: i64) -> i64

Internal byte reader.

_fnm_match

fn _fnm_match(pat: &i8, plen: i64, pi: i64, name: &i8, nlen: i64, ni: i64) -> i64

Internal: recursive match helper. Returns 1 if pat[pi..] matches name[ni..].

fnmatch

fn fnmatch(pat: &i8, plen: i64, name: &i8, nlen: i64) -> i64

Match a filename against a glob pattern. Returns 1 if matches.

fnmatch_has_magic

fn fnmatch_has_magic(pat: &i8, plen: i64) -> i64

Check if pattern contains glob special characters (*, ?, [).

fnmatch_escape

fn fnmatch_escape(path: &i8, plen: i64, out: &i8) -> i64

Escape glob special characters in a path. Returns length written.