IFileSystemInfo.Attributes

Syntax

Attributes: FileAttributes;

Description

The Attributes property determines file attributes.

Example

Sub Main;

Var

FileSInfo: IFileSystemInfo;

s: String;

Begin

FileSInfo:=New FileInfo.Attach("c:\1.txt");

If FileSInfo.Exists Then

FileSInfo.Attributes:=FileAttributes.Hidden Or FileAttributes.ReadOnly;

End If;

Dispose FileSInfo;

End Sub Main;

After executing the example the Hidden and Read-Only attributes are set for the 1.txt file if it exists.

See also:

IFileSystemInfo