File Update
-
Am trying to oepn a text file( not empty file). Want to delete a specified portion of the file ( around 10 chars from the middle of the file). how can i do it? i've already calculated start position and end position. but don't know how to delete that part and again write that part. Thanks in advance
kamalesh
-
Am trying to oepn a text file( not empty file). Want to delete a specified portion of the file ( around 10 chars from the middle of the file). how can i do it? i've already calculated start position and end position. but don't know how to delete that part and again write that part. Thanks in advance
kamalesh
-
Am trying to oepn a text file( not empty file). Want to delete a specified portion of the file ( around 10 chars from the middle of the file). how can i do it? i've already calculated start position and end position. but don't know how to delete that part and again write that part. Thanks in advance
kamalesh
One way is to read the entire file contents into a buffer, modify the buffer, and write the buffer back out to the file.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb