otherside
Well-known member
Hey guys
Is there any way to add some bytes to a specific place in a file WITHOUT reading all the file in the memory ?
Assume that the file is very large up to 200Mb
i tried to use the append mode in conjuction with seek, but i get an exception that you cant seek in append mode
so i assume thats not the way to do it
Any ideas ?
Is there any way to add some bytes to a specific place in a file WITHOUT reading all the file in the memory ?
Assume that the file is very large up to 200Mb
i tried to use the append mode in conjuction with seek, but i get an exception that you cant seek in append mode
so i assume thats not the way to do it
Code:
Dim Fstr As New FileStream("test.txt", FileMode.Append)
Dim data(10) As Byte
Fstr.Seek(50, SeekOrigin.Begin)
Fstr.Write(Data, 0, 10)