This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: How to get file name(with path from fstream object)
- From: Jonathan Wakely <cow at compsoc dot man dot ac dot uk>
- To: Ajay Bansal <Ajay_Bansal at infosys dot com>
- Cc: libstdc++ at gcc dot gnu dot org, Gagan Puri <gaganpuri at infosys dot com>,Pankaj Garg <pankaj_garg at infosys dot com>
- Date: Mon, 3 Feb 2003 17:34:37 +0000
- Subject: Re: How to get file name(with path from fstream object)
- References: <2B721C6525F0D411B1E900B0D0226BDD02148D3D@mohmsg01.ad.infosys.com>
On Mon, Feb 03, 2003 at 10:56:30PM +0530, Ajay Bansal wrote:
> I have a fstream object for which I need the file name & path of the
> file. i.e. file name which was used to create the fstream object. How to
> get the file name(with path) for that fstream object ????
(This question isn't about the development of libstdc++-v3 and so is
inappropriate here. A newsgroup such as comp.lang.c++ might be more
appropriate)
There is no standard way to do this. You might be able to do it with
a derived filebuf that stores the filename given to open().
jon
--
"It is seldom that liberty of any kind is lost all at once."
- David Hume