comp.lang.ada
 help / color / mirror / Atom feed
* Reducing Size of Files with direct_io
@ 1992-09-22 20:21 pa.dec.com!nntpd2.cxo.dec.com!bonmot!wallace
  0 siblings, 0 replies; only message in thread
From: pa.dec.com!nntpd2.cxo.dec.com!bonmot!wallace @ 1992-09-22 20:21 UTC (permalink / raw)


simonson@cs.washington.edu (Kevin Simonson) writes:
:      With package "direct_io" (dealt with on pages 14-7 to 14-9 of the
: LRM), any element of a file can be modified in any way, additional elements
: can be added onto the end of the file, and in addition to this the file can
: even be deleted.
: 
:      It strikes me as being a very flexible way to handle a file, but
: there is one feature that it seems to lack.  The size of the file can be
: increased by writing past the end, but I can't find any way to DECREASE
: the size of the file, without outright deleting it.  Does anyone know how
: such a thing could be accomplished?  Thanks in advance.
: 
:                                      ---Kevin Simonson

<<reply>>

The DIRECT_IO package is really a basic interface to indexed sequential
operations on a file and hence it is up to the file system of your run-time
host how indexed files are managed.  I know that element deletions have
to have VAX/VMS RMS operations done on them in VAX Ada to flush file
operations so that an index file increases and decreases correctly.  
My suggestion is to close the file and reopen to keep pure Ada programming.  
Remember to keep the current index between closes and opens!

Hope this helps!

Richard Wallace
Digital Equipment Corporation
301 Rockrimmon Blvd. South
CXO2-1/7A
Colorado Springs, CO 80919-2398
(719)548-2792
<wallace@cookie.enet.dec.com>

	"The opinions expressed are my own, Unlce Ken or Uncle Bob
	 may, or may not, agree with me.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1992-09-22 20:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1992-09-22 20:21 Reducing Size of Files with direct_io pa.dec.com!nntpd2.cxo.dec.com!bonmot!wallace

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox