I have a script that creates a catalog of files in a certain directory. But since this operation is time consuming, I dont want to run the script for all files over and over.
One way to solve this would be running a directory watcher that polls changes / hooks directly into Win32 APIs.
That is certainly doable, (and I have such an implementation in hand), but I'm wondering if Directory Opus has a way to run / hook into write operations performed in a directory, optionally cancelling the operation depending on exit code of a script?
No, there's nothing like that in the scripting API. It would be best done as something standalone, I think. Or as something that makes a note of which files it has already seen so it doesn't process them again.