This is like another Directory api in that it abstracts the filesystem.
So it needs to be very specific regarding exactly what happens, e.g. which exceptions you should get, what the behavior is when things do or do not already exist, and so on.
Otherwise different repository implementations could be lenient, buggy, or even cause data loss.
First we need to figure out #15579