/
SetFileAttribute

SetFileAttribute

Parameter

(File : String; Attributes : Integer) : Integer;

Beschreibung

Setzt die Dateiattribute der angegebenen Datei.  Mögliche Attribute sind:

  • faReadOnly
  • faHidden
  • faSysFile
  • faVolumeID
  • faDirectory 
  • faArchive 
  • faAnyFile

Die Attribute können mittels logischem OR kombiniert werden.

Über das logische AND können Attribute entfernt werden.

Beispiel

SetFileAttribute('c:\example.dat',faReadOnly or faArchive);
if DeleteFile('c:\example.dat',0,false) = false then ShowMessage('Die Datei ist schreibgeschützt!');

Sihe auch

GetFileAttribute

Related content

SetFileAttribute
SetFileAttribute
More like this
SetFileAttribute
SetFileAttribute
More like this
SetFileAttribute
SetFileAttribute
More like this
GetFileAttribute
GetFileAttribute
More like this
GetFileAttribute
GetFileAttribute
More like this
DeleteFile
More like this