Returns True if path has one of the given extensions (without the leading dot; case sensitivity depends on the file system), as in the following example, which detects an MSEIDE project file
Source position: msefileutils.pas line 196
function checkfileext( |
const path: filenamety; |
const extensions: array of filenamety |
):Boolean; |
Returns True if path has one of the given extensions (without the leading dot; case sensitivity depends on the file system), as in the following example, which detects an MSEIDE project file.
uses sysutils, msefileutils, msetypes, msesys; { fileinfoty } var lfilename: filenamety; ldatetime: tdatetime; lfiles: filenamearty; lfileinfo: fileinfoty; begin lfiles := searchfiles('demo*', '.'); for lfilename in lfiles do begin writeln(lfilename); ldatetime := getfilemodtime(lfilename); writeln('Last modification: ', datetimetostr(ldatetime)); if getfileinfo(lfilename, lfileinfo) then if fis_extinfo1valid in lfileinfo.state then writeln('Size: ', lfileinfo.extinfo1.size, ' bytes'); if checkfileext(lfilename, ['prj']) then writeln('MSEide project'); end; end.