Files Delphi

Title: How to check, if a filename statement is masked
function IsMaskedFileName(aFileName: string): Boolean;
begin
// First method
Result := (StrScan(PChar(aFileName), '*') nil) or
(StrScan(PChar(aFileName), '?') nil);
// Second way
Result := ((LastDelimiter('*?', aFileName) 0);
end;