The idea is to avoid two people writing at the same time
I have done some thinking and I think there is only a way to achieve this and still being working async. In other words, reads are fine to be async as they are, but for writes, the server has to have a global state of what file is being written at the moment which has some sort of queuing (or even simpler nextTick) until the resource is free.
By bringing back sync, a possible attack could be loading a 10 GB file while two people are chatting (hence breaking their conversation)
Not a problem right now, can reconsider in the future.
Reopening, as the future is now.
Most helpful comment
Reopening, as the future is now.