From: "Joe Hagen" Newsgroups: comp.os.msdos.djgpp Subject: Re: What is the canonical way to find out if a file exists (in g++)? Date: Wed, 5 Jan 2000 16:25:53 -0600 Organization: Chorus Netwoks Lines: 29 Sender: reguser AT a26-16 DOT madison DOT chorus DOT net Message-ID: <850gep$epu$1@news.chorus.net> References: NNTP-Posting-Host: a26-16.madison.chorus.net X-Trace: news.chorus.net 947111193 15166 216.165.150.80 (5 Jan 2000 22:26:33 GMT) X-Complaints-To: abuse AT chorus DOT net NNTP-Posting-Date: 5 Jan 2000 22:26:33 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Mike, Actually, none of these cases will find the file, since it exceeds the 8.3 DOS filename limit. There's a typo in the code that outputs the same expression for either case for the cout call when you checked using _file_exists(). Joe jdhagen AT chorus DOT net > >On Tue, 4 Jan 2000, Mike Demoulin wrote: > > > Directory of C:\FT\FT4WIN > > 12/28/99 07:15p 58,134 FTCOMINTEGRATED.OCX.ZIP > 1 File(s) 58,134 bytes > 326,311,936 bytes free > > Here is the test program: > if (__file_exists (file.c_str ())) > cout << "__file_exists () found the file" << endl; > else > cout << "__file_exists () found the file" << endl;