Autor Beitrag
Bronstein
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 578
Erhaltene Danke: 1

WIN XP
Delphi 6 / Delphi 2006 / Delphi XE
BeitragVerfasst: Fr 19.03.04 06:31 
Gibt es eine Möglichkeit, die mir prüft ob eine Datei schreibgeschützt ist.

wenn ja möchte ich eine Funktion schreiben die mir das prüft und falls die Datei Schreibgeschützt ist diesen Schreibschutz aufhebt

_________________
Es gibt keine dummen Fragen nur dumme Antworten!!!
toms
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1099
Erhaltene Danke: 2



BeitragVerfasst: Fr 19.03.04 06:41 
ausblenden Delphi-Quelltext
1:
2:
if (FileGetAttr(FileName) and faReadOnly) > 0 
 then FileSetAttr(FileName, FileGetAttr(FileName) xor faReadOnly);