var attrs:integer;
attrs:=filegetattr('c:\123.dbf');
if (attrs and fareadonly)<>0 then showmessage
('the file is readonly');
fareadonly(0) fahidden(2) fasysfile(4) faarchive(32)
ExtractFileExt function
Returns the extension portions of a file name.
Delphi syntax:
function ExtractFileExt(const FileName: string): string;
Description
Use ExtractFileExt to obtain the extension from a file name. For example, the following code returns the extension of the file name specified by a variable named MyFileName: