Article View: borland.public.cppbuilder.nativeapi
Article #14405Re: FileCreate function problem
From: Martin C
Date: Tue, 12 Aug 2003 23:40
Date: Tue, 12 Aug 2003 23:40
36 lines
2178 bytes
2178 bytes
Sorry typing mistake, and yes I am using "c:\\CProjects\\test.txt"
"Norm Jaffe" <mail@aurelsystems.com> wrote in message
news:3f398d1f$1@newsgroups.borland.com...
> Is this the exact code that you are using? If so, you'll need to
"double-up"
> each of the backslashes,
> as "c:\\CProjects\\test.txt".
>
> Norm Jaffe
> "Martin C" <martinc@aol.com> wrote in message
> news:3f3989ee@newsgroups.borland.com...
> > I am trying to create a file on runtime and start using it, using the
> > following code..
> >
> > if(!FileExists("c:\CProjects\test.txt"))
> > {
> > if(!FileCreate("c:\CProjects\test.txt"))
> > {
> > TStringList *Sample1 = new TStringList();
> > Sample1->LoadFromFile("c:\CProjects\test.txt"); // Error File
> > does not exist...!!!
> > }
> > }
> >
> > please let me know what I am doing wrong here...and why the LoadFromFile
> > function fails although i am sure that the file is created...
> >
> > P.S. it might look wierd why I am loading an empty file content in a
> > StringList, but I have my reasons for it...
> > thanks..
> >
> >
>
>
Technical Details
Message-ID:
<3f398d79@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3f3989ee@newsgroups.borland.com> <3f398d1f$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,5967b7894a1d3380 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-08-12 18:16:48 PST From: "Martin C" <martinc@aol.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3f3989ee@newsgroups.borland.com> <3f398d1f$1@newsgroups.borland.com> Subject: Re: FileCreate function problem Date: Tue, 12 Aug 2003 15:40:26 -0800 Lines: 38 Organization: V Safe X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 62.135.7.221 Message-ID: <3f398d79@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1060736377 62.135.7.221 (12 Aug 2003 17:59:37 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail