Ok seems to be just two hooks, the other one is file_write. Still, would be good to have them in a utility function.