comp.lang.ada
 help / color / mirror / Atom feed
* Resize / Truncate Direct_IO file
@ 2002-03-12 20:40 John Cupak
  2002-03-12 22:41 ` Jeffrey Carter
  0 siblings, 1 reply; 2+ messages in thread
From: John Cupak @ 2002-03-12 20:40 UTC (permalink / raw)


A co-worker asked me if it is possible to truncate or resize an Ada
Direct_IO file, and after scouring the 'net and past postings I
couldn't provide an answer for her.

So, here goes: Suppose I have an instantiated Direct_IO file with 10
records.
I set the index to 5, and realize I don't need records 6-10. How do I
truncate or resize the file, short of deleting records 6-10? I don't
see an End_Of_File procedure for Direct_IO. Am I missing something?

John Cupak



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Resize / Truncate Direct_IO file
  2002-03-12 20:40 Resize / Truncate Direct_IO file John Cupak
@ 2002-03-12 22:41 ` Jeffrey Carter
  0 siblings, 0 replies; 2+ messages in thread
From: Jeffrey Carter @ 2002-03-12 22:41 UTC (permalink / raw)


John Cupak wrote:
> 
> So, here goes: Suppose I have an instantiated Direct_IO file with 10
> records.
> I set the index to 5, and realize I don't need records 6-10. How do I
> truncate or resize the file, short of deleting records 6-10? I don't
> see an End_Of_File procedure for Direct_IO. Am I missing something?

No. A Direct_IO file can get bigger, but not smaller. Within the
confines of Direct_IO, all you can do is create a new file with only the
desired data.

-- 
Jeffrey Carter



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-03-12 22:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-12 20:40 Resize / Truncate Direct_IO file John Cupak
2002-03-12 22:41 ` Jeffrey Carter

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