GetFileMode

www.kxcad.net Home > Electronic Index > Altium(Protel) Index


Your Ad Here

Declaration

Function GetFileMode(Const FName : TDynamicString; Var Attr : Integer) : TByte;

Description

The GetFileMode function returns the attributes of the file as a string of bits. This value is the same as the Attr field of a TSearchRec record. Check for individual attributes with code.

Example

Attrs := GetFileMode('MyFile.sys');

if Attrs and faHidden <> 0 then

  FileSetAttr('MyFile.sys', Attrs – faHidden);

A return value of -1 indicates that an error occurred. Note: See Borland Delphi’s TSearchRec record for a description of the individual attribute constants.

See also

File IO Routines

Your Ad Here