Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!ucsd!ucbvax!decwrl!hplabs!hp-pcd!hpcvlx!bturner
From: bturner@hpcvlx.HP.COM (Bill Turner)
Newsgroups: comp.sys.ibm.pc
Subject: Re: disk updates and power failures
Message-ID: <1180037@hpcvlx.HP.COM>
Date: 8 Jul 88 16:41:53 GMT
References: <472@apctrc.UUCP>
Organization: Hewlett-Packard Co., Corvallis, OR, USA
Lines: 15

There are two things that can be done to keep disk files updated correctly:

1) The SYNC call will flush the "dirty" disk buffers, but this doesn't update
the file length in the directory.  The data is there, but the dir entry has
a different size.

2) You can close and reopen the file after each write.  Don't laugh!  This is
the only way I know of using DOS (and not doing nasty things yourself) to
force the file to be correctly updated to disk after each write.

--Bill Turner 
HP Corvallis Workstation Operation

"Every time I have to kill someone who's family, I get depressed."
	--Ferman Crotty (Ed Asner), "The Wild, Wild West"