Du setzt als Attribut immer fsReadOnly, wunderst dich aber, dass TSearchRec.Attr und fsReadOnly nicht gleich sind.
TSearchRec.Attr gibt alle Attribute an.
Das ist mehr als Schreibgeschützt.
Außerdem, hat es irgend einen Sinn, dass du nur nach schreibgeschützten Dateien suchst?
Das hier ist Mist:
Delphi-Quelltext
1:
| if (sr.Attr and FileAttrs) = sr.Attr then |
wenn du das wirklich abfragen willst musst du folgendes schreiben:
Delphi-Quelltext
1:
| if (sr.Attr and FileAttrs) <> 0 then |
Kleiner Tipp:
Das steht alles in der Onlinehilfe.
There are only 10 types of people: those who understand binary and those who don't.