Re: Prepending Data to a File
- To: mathgroup at smc.vnet.net
- Subject: [mg116977] Re: Prepending Data to a File
- From: Gregory Lypny <gregory.lypny at videotron.ca>
- Date: Sun, 6 Mar 2011 05:43:27 -0500 (EST)
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