Article View: borland.public.cppbuilder.nativeapi
Article #7715Re: File I/O
From: Bob Gonder
Date: Tue, 11 Jan 2005 18:17
Date: Tue, 11 Jan 2005 18:17
13 lines
1678 bytes
1678 bytes
Patrick Wong wrote: >Thanks. To ask more specifically, FileOpen() can open an existing file with >desired access mode. However, when one has to open a *NEW* file, the >FileCreate() does not have such access mode to select. Do I have to create >it by FileCreate(), then FileClose(), and then FileOpen() again to allow the >file to work in the desired fashion? That sounds a lot like the bad old days of Basic, where it would complain to the user if the program tried to delete a file that wasn't there, so we would do Open/Close/Kill/Open. Today, it should be enough to just delete the file before creating it. (Or use an API that allows it, such as CreateFile)
Technical Details
Message-ID:
<5l58u09e76tkkcjmsrm8q730eo981sq52v@4ax.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<41e33da8$1@newsgroups.borland.com> <41e3561e$3@newsgroups.borland.com> <41e3ab0a@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,991cc71bafbd3990 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: Bob Gonder <notbg@notmindspring.invalid> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: File I/O Date: Tue, 11 Jan 2005 10:17:02 -0800 Organization: MindSpring Enterprises, Inc. Reply-To: notbg@notmindspring.invalid Message-ID: <5l58u09e76tkkcjmsrm8q730eo981sq52v@4ax.com> References: <41e33da8$1@newsgroups.borland.com> <41e3561e$3@newsgroups.borland.com> <41e3ab0a@newsgroups.borland.com> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 69.69.91.118 X-Trace: newsgroups.borland.com 1105467423 69.69.91.118 (11 Jan 2005 10:17:03 -0800) Lines: 15 Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail