This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: bits/std_fstream open prot gcc-3.0.3
- From: Phil Edwards <phil at jaj dot com>
- To: Lorenzo Delana <ldelana at libero dot it>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Mon, 4 Feb 2002 11:50:19 -0500
- Subject: Re: bits/std_fstream open prot gcc-3.0.3
- References: <3C5D3262.9060805@libero.it>
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