Read only file for second user

How to prevent a file from being opened twice at the same time by two different users?

You can use an app:

I don’t know if that works just on the webinterface or how this is implemented with the desktop clients.