This is only new data allocated, so it's a very careful procedure.
If an empty file is read, we want to deal with it in later user code rather than just failing immediately.