I’m looking at the NFS API and it looks as if the only way to create a new file is with create()
which means you have to commit the file immediately.
Is this correct? Or is there a way to create a new file, then make calls to write()
, before either abandoning it or committing it to the network.
It looks to me that you can do that after the file has been inserted into the MD, because then you can do fetch(), open(), write() ... close(), update()
, but I can’t see a way to support this way of creating a new file using the NFS API.
Can someone confirm or correct that?
Assuming that’s the case, how can I avoid creating an empty file every time in order to achieve the effect of creating a new file which I can write to multiple times, before I close it and finally insert()
into the MD?
Would it work to keep hold of an NFS File object and re-use it for each new file by opening it for overwrite, doing multiple writes, closing and then doing insert()
? Then repeating this with that same object?