Masks unit
Contains classes for matching file names to file masks.
masks.pas contains classes, types, and routines used implement
file and directory masks. Masks are patterns used to match file names found
on the local file system. Support is provided for both UNIX- and
Windows-style masks. The unit includes utility functions to compare one or
more file names to a given mask, including: MatchesMask, MatchesWindowsMask,
MatchesMaskList, and MatchesWindowsMaskList.
It is fast and optimized, and fully supports Unicode. Also supports DOS/Windows compatible masks which behave differently from standard masks.
masks.pas is part of the
LazUtils package.
Author: José Mejuto
Changes and improvements by: Juha Manninen and Bart Broersma.
Classes and records
EMaskError | class | Exception raised for an invalid character in TMask. |
TMask | class | The TMask class represents a mask expression and performs comparisons. |
TMaskBase | class | Implements the base class used to define and evaluate a mask expression. |
TMaskList | class | Implements a list for mask class instances. |
TMaskUTF8 | class | Implements a class used to define, evaluate, and compare a mask expression using UNIX file system mask conventions. |
TParseStringList | class | Parses text into a list of strings using a specified line separator. |
TWindowsMask | class | Implements the class type used to evaluate and compare Windows-specific mask expressions. |
TWindowsMaskList | class | Implements a list for mask class instances which support Windows-specific file masks. |
TWindowsMaskUTF8 | class | Implements a class used to define and evaluate a mask expression using Windows file system mask conventions. |
Procedures and functions
DbgS | function | Gets a string with the value(s) for the specified type. Used to format debugger messages. |
MatchesMask | function | Indicates whether the file name matches the specified mask. |
MatchesMaskList | function | Determine whether the specified file name matches at least one of the specified masks. |
MatchesWindowsMask | function | Indicates whether the file name matches the specified Windows-style file system mask. |
MatchesWindowsMaskList | function | Determine whether the specified file name matches at least one of the specified Windows-specific masks. |
Types
TMaskClass | type | Class type used to create new instances of the TMaskUtf8 type. |
TMaskListClass | type | Not used in the current LazUtils implementation. |
TMaskOpCode | enumeration | Represents operations needed for an entry in a mask specification. |
TMaskOpCodes | set | Set type used to store values from the TMaskOpcode enumeration. |
TMaskOption | enumeration | Contains options which can be enabled or disabled in TMask comparisons. |
TMaskOptions | set | Set type used to store values from the TMaskOption enumeration. |
TWindowsQuirk | enumeration | Represents types of Windows-specific quirks for file and directory masks. |
TWindowsQuirks | set | Set type used to store values from the TWindowsQuirk enumeration. |
Constants
AllMaskOpCodes | constant | Set with all of the mask op codes values. |
AllWindowsQuirks | constant | Sets type with all of the Windows-specific quirk values. |
DefaultMaskOpCodes | constant | Contains the default op code values used for mask class instances. |
DefaultWindowsQuirks | constant | Set with the default Windows-specific quirk values. |
MaskOpCodesDisableRange | constant | Contains the set of op codes allowed when sets and ranges are disabled in mask expressions. |
MaskOpCodesNoEscape | constant | Contains op codes enabled when escape characters and single character wildcards are not used. |
Uses
ClassesSysUtilsContnrsLazUtilsStrConstsLazUTF8
An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.
