AFAIK, you're stuck with basically writing a new file, deleting the old one and renaming the new one to match the old filename