Writing to a particular position

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: lexicon (ekaralar_at_gmail.com)
Date: 03/03/05


Date: 3 Mar 2005 11:54:03 -0800

Hello;
I have a text file. Assume that this file has some textual content. I
want to append a text into this file at a specific position; not to the
end of file. I assume that one way of doing this would be setting the
stream length, shifting the characters after the position + lengt to
the end, but this method seems inefficient to me. Another way might be,
storing the text content in an array and manipulating and writing this
array to the file, but this seems inefficient to me too.
Is there any way of doing this without the methods i thought about
above ? All ideas are appreciated, thank you very much...



Relevant Pages

  • Writing to a particular position
    ... want to append a text into this file at a specific position; ... storing the text content in an array and manipulating and writing this ... array to the file, but this seems inefficient to me too. ...
    (microsoft.public.dotnet.csharp.general)
  • Re: C# arrays
    ... > like it could prove somewhat inefficient in some situations. ... The above way of writing has the nice effect of stating that you are ... thinking of the array as being on the stack. ...
    (microsoft.public.dotnet.languages.csharp)
  • [ANN] Rio 0.4.1
    ... = Rio - Ruby I/O Facilitator ... Iterate over the .rb files in a directory and its subdirectories. ... Return an array of the .rb files in a directory and its ... Copy or append a file to a string ...
    (comp.lang.ruby)
  • {ANN] Rio 0.4.0
    ... = Rio - Ruby I/O Facilitator ... Iterate over the .rb files in a directory and its subdirectories. ... Return an array of the .rb files in a directory and its ... Copy or append a file to a string ...
    (comp.lang.ruby)
  • Re: Appending text files
    ... > Does anyone know how to append text files using VB? ... text files from SQL Server using DTS. ... The array can contain one or more filenames. ... Dim FileIn As Long ...
    (microsoft.public.vb.general.discussion)