From: Hal Fulton Date: 2005-04-19T18:42:17+09:00 Subject: Re: Modifying content in a file Lyndon Samson wrote: > On 4/19/05, Ghislain Mary wrote: > >>But can't we open a file in read-write mode and directly do >>substitutions in it without using an auxiliary file? >> > > You can use IO.pos to seek within a file, however what will you do if > your substitute string is not the same length as the original string? > Files have no concept of insert/delete. > Although it would be an interesting exercise to create a descendant of File that would behave that way. It would be analogous to the way strings are reallocated in RAM. Inefficient, certainly, but disk drives are faster than they were in 1980. ;) Hal