When you realized that Mac OS X didn’t have an equivalent API, did you perhaps consider that it was for a good reason and that you should redesign your application to fit the conventions of the system? How did you conclude that your UI was oh so special that it deserved horking up the Finder experience for your users?
Or did/does the Finder check whether to-be-deleted files are open? Or did I forget how older Mac file systems behaved?
You can't really blame macOS for this one. Interesting to hear this isn't just a Windows thing though.