Is there any way to detect if a file has been opened/close, by any application?
I want to delete a file as soon as it has been released (closed) by an external editor.
I am looking specifically for "opened" and "closed" events, which are not provided by WatchServices
.
I thought about scanning processes for specific names (e.g., "Word", "Excel", etc.), but if find one, I need to somehow find what exact files are opened by these processes.