view cutils/util/fnmatch.py @ 300:1fc117f5f9a1

treesum: Implement --include/--exclude commandline parsing for file name inclusion and exclusion. BUGS: - Real filename matching not yet implemented - Pattern description only very rudimentary
author Franz Glasner <fzglas.hg@dom66.de>
date Tue, 04 Mar 2025 16:30:10 +0100
parents
children bf88323d6bf7
line wrap: on
line source

# -*- coding: utf-8 -*-
# :-
# :Copyright: (c) 2020-2025 Franz Glasner
# :License:   BSD-3-Clause
# :-
r"""File name matching.

"""

from __future__ import print_function, absolute_import


__all__ = []


HELP_DESCRIPTION = """\
PATTERNs
========

  glob: case-sensitive, anchored at the begin and end
  iglob: case-insensitive variant of "glob"
  re: regular expression
  path: plain text example (rooted), can be a file or a directory or a prefix
        thereof
  filepath: exactly a single file, relative to the root of the tree

"""