On 19/05/2010 22:28, John Wu wrote:
> Hi,
>
> I want to write some content to an existing file and I want to new
> content be the first line of the file. How to do that?
>
>    
Hi John,

You can't do it directly - there is no insert for disk files. What you 
have to do depends how big it is.

For file that will fit in RAM, load it, join with your first line, and 
save it all.

For larger files, you need to copy and rename.

Regards

Ian

> Thanks
>    
>
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 9.0.819 / Virus Database: 271.1.1/2883 - Release Date: 05/19/10 07:26:00
>
>