0

As I read some tutorial, I just get the idea to input to the file totally replace, overwrite or continue at the end.
I wonder any code that in put text in the middle like this
brown
||
I want a V dog.

2
Contributors
4
Replies
5
Views
8 Years
Discussion Span
Last Post by tgsoon2002
0

It's impossible to insert more or less bytes in the middle of the file. Of course, you can overwrite some bytes - that's all.
As usually, file editors create new file and write new content to it, then rename or remove the old one and rename new file with the old file name.

0

so the word program somekind like that?
They load all of them, after you edit, replace the old by the new one?

0

so the word program somekind like that?
They load all of them, after you edit, replace the old by the new one?

By the way, MS Word doc file is not a text file: DOC is a (proprietary) binary format.
Yes, it's (one of) possible text editor pattern. Variants:
1. see my post above (safe method)
2. read in memory, edit then overwrite old file from the first changed point (or from the start) to the end - see your post ;)
Did you think that hard disk track is an elastic string which is capable to place additional inserted bytes into the middle of the file contents?
;)

0

oh yeah you don't tell, I fogot.
So any idea about this.
I have project to change
coding<=> diagram. Some kind like edit by drag and drop bunch of code, input values, type of it.
Hope you help

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.