[fpc-devel] Default value for "Rights" in TFileStream.Create

Bart bartjunk64 at gmail.com
Fri Dec 19 22:55:38 CET 2025


Hi,

Just wondering.
If you call TFileStream.Create(aFileName, aFileMode) it calls
TFileStream.Create(aFileName, aFileMode, 438).
438 (octal 666) tramslates to -rw-rw-rw-

If I create a file on my linux machine (using touch or cat) then
rights will be -rw-rw-r--, which is equivalent to octal 664 (decimal
436).

So, that just made me wonder why the choice for octal 666?
Notice that I'm a linux novice.

(For laughs. I accidentally used 0 for the rights param somewhere.
That turned out te be quite funny.)

-- 
Bart


More information about the fpc-devel mailing list