> Fred, the tiSetFileReadOnly() I sent you the other day already uses > fpstat() before checking/setting the read-only flag. So you are halfway > there. ;-)
Yep, many thanks. ;-) PS: Bart's tip works like lovely charm... => function FileIsExecutable(const AFilename: string): boolean; var Info : Stat; begin // first check AFilename is not a directory and then check if executable Result:= (FpStat(AFilename,info{%H-})<>-1) and FPS_ISREG(info.st_mode) and (BaseUnix.FpAccess(AFilename,BaseUnix.X_OK)=0); end; Fre;D
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal