Abandon File Open

Hi all,

A strange question: Is it possible to abandon opening a file that you’ve double clicked on without doing something as drastic as forcing the finder to quit? If not, is there a way to lock or set a file to Read-Only immediately after being opened to prevent editing of the file?

The scenario:
I’m trying to find a cloud based workaround to locking InDesign files that are being synced by a cloud drive to emulate the behaviour of working on a shared file server. Currently I have an InDesign event listener that launches a BeforeOpen event that checks to see if the file is in use by someone else in the team. However, when I establish that the file is currently open, I have no idea how to prevent that user from making changes without letting them open the document and closing it on them, which isn’t ideal because some documents take a long time to open.

Any other ideas I might be missing, I’d be keen to know, but from what I’ve searched online, it seems to be a common problem with cloud based collaborative workflows.