[fpc-pascal] [oldlinux]: STAT_IRWXG get chmod number

Marco van de Voort marcov at stack.nl
Sun Apr 1 19:14:22 CEST 2007


> Is there anybody has worked with STAT_IRWXG ?
> http://www.freepascal.org/docs-html/rtl/oldlinux/index-2.html

That is a legacy api. Better use Baseunix:
 
> I need infos in order to get a function that get file permissions on 
> linux system (like 0777, 0755...)

http://www.freepascal.org/docs-html/rtl/baseunix/fpaccess.html

or via stat:

http://www.freepascal.org/docs-html/rtl/baseunix/fpstat.html

Note that you can make octal values using the & notation.

E.g.

var i :  integer;

begin
 i:=&770;
 writeln(i);
end.




More information about the fpc-pascal mailing list