Generally, adding anything to or removing anything from a file directly is a bad idea.
You’re better off reading the contents of the file into memory, modifying them in memory, and then writing them out.
Generally, adding anything to or removing anything from a file directly is a bad idea.
You’re better off reading the contents of the file into memory, modifying them in memory, and then writing them out.