realbasic-nug
[Top] [All Lists]

Re: Should I Delete to Overwrite?

To: REALbasic Network Users Group <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Should I Delete to Overwrite?
From: Will Leshner <leshner at ljug dot com>
Date: Fri, 30 Aug 2002 10:36:40 -0700
I think I tend to use binary files even when the contents is text. But I've never had a problem with overwriting a file, though I do set it's length to 0 before I do it.

On Friday, August 30, 2002, at 10:14 AM, George Clark wrote:

Some people have reported write failures if they don't delete first, so to be safe I always delete the file if it exists, and I'm replacing its entire contents. The apparent reason (as I understand it)for a failure with a text file is that you're using .CreateTextFile, which doesn't always seem to work properly if the file already exists. (It would be nice if OpenAsTextFile had
read/write parameters like OpenAsBinaryFile does.)



<Prev in Thread] Current Thread [Next in Thread>