Re: Deleting contents of file
- From: Mark Space <markspace@xxxxxxxxxxxxxx>
- Date: Thu, 28 Feb 2008 10:23:49 -0800
Gordon Beaton wrote:
When the user deletes the item from the JList, write the remaining
items to a new (temporary) file, delete the old file, then rename the
temporary file. By doing it this way you can avoid deleting the
original file if any errors occur while writing the temporary one.
Rather than deleting the old file, consider moving to a back-up file. Like filename + ".bak" or "~"+filename. That way, if you fugger it up, you still have the backup. ;)
.
- References:
- Deleting contents of file
- From: christopher_board
- Re: Deleting contents of file
- From: Gordon Beaton
- Deleting contents of file
- Prev by Date: Re: New technology, old idea.... why not?
- Next by Date: Re: Socket with setSoTimeout() never times out
- Previous by thread: Re: Deleting contents of file
- Next by thread: Re: Deleting contents of file
- Index(es):