bits/std_fstream open prot gcc-3.0.3

Phil Edwards phil@jaj.com
Mon Feb 4 08:53:00 GMT 2002


On Sun, Feb 03, 2002 at 01:51:46PM +0100, Lorenzo Delana wrote:
> 
> where to find the old fstream::open style ? for that
> 
> fstream f; f.open( "test.txt", ios_base::out, 0600 ); works fine ?
> in other words, how can I set protection field when open in out mode a 
> file ?

Right now this is not possible, I think.  The C++ standard doesn't say
anything about file protection; it only does the same things that fopen()
does.  You should look into umask's instead.


Phil

-- 
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace.  We seek
not your counsel, nor your arms.  Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen.            - Samuel Adams



More information about the Libstdc++ mailing list