MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Prepending Data to a File

  • To: mathgroup at smc.vnet.net
  • Subject: [mg117001] Re: Prepending Data to a File
  • From: Armand Tamzarian <mike.honeychurch at gmail.com>
  • Date: Mon, 7 Mar 2011 05:47:57 -0500 (EST)
  • References: <ikvohr$f58$1@smc.vnet.net>

On Mar 6, 9:44 pm, Gregory Lypny <gregory.ly... at videotron.ca> wrote:
> Hello David,
>
> Thanks for responding.  Appending would work fine as well.  How do I do that in Mathematica?
>
> Regards,
>
> Gregory
>
> > I don't think there is any solution to this which does not amount to
> > creating a new file with the data to be prepended, and then appending
> > the other data to it, possibly followed by erasing the original file and
> > renaming the new file. This obviously gets expensive if the file is very
> > large.
>
> > The problem is that operating systems don't usually offer a way to
> > perform prepending to files, so neither do computer languages.
>
> > Have you thought about storing the file in reverse order, so that you
> > can simply append to it, and then reversing the whole file again if
> > necessary?
>
> > It may be worth telling us a little more about your problem.
>
> > David Bailey


The OpenAppend documentation has examples that look like what you
need.

Mike


  • Prev by Date: results from Array and ParallelArray differ
  • Next by Date: Re: Mathplayer on tablet device
  • Previous by thread: Re: Prepending Data to a File
  • Next by thread: Re: NIntegrate and speed