Autor Beitrag
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10184
Erhaltene Danke: 1258

W10ent
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Do 08.10.09 18:34 
Moin!

Irgendwie habe ich im Hinterkopf, dass es eine API-Funktion gibt, mit der man prüfen kann, ob ein Dateiname auf eine bestimmte Suchmaske passt. Beispiel:
ausblenden Delphi-Quelltext
1:
2:
if FileMatch('Irgendwas.txt','*.txt'then // Funktionsname ist unklar - das ist das Problem...
  ShowMessage('Textdatei');

Ich meine sowas schon mal gesehen zu haben, aber ich komme einfach nicht auf die richtigen Stichwörter, meine Suche (hier, Google, MSDN) liefert einfach nix. :(

Gibt´s die Funktion? Wenn ja, wie heißt das Ding?! :gruebel:

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
SvenAbeln
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 334
Erhaltene Danke: 3



BeitragVerfasst: Do 08.10.09 18:58 
In der Unit Masks:
ausblenden Delphi-Quelltext
1:
function MatchesMask(const Filename: stringconst Mask: string): Boolean;					

Gibt an, ob ein Dateiname oder ein anderer Quell-String dem in einem Filter-String angegebenen Format entspricht.
Narses Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10184
Erhaltene Danke: 1258

W10ent
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Do 08.10.09 21:31 
Moin!

Danke :beer: das hatte ich gesucht... :autsch:

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.