I have tried:
Checking the
FSCatalogInfonodeFlagsto see ifkFSNodeForkOpenBitis set (usingkFSNodeForkOpenMask).Checking whether the creator code is between
kFirstMagicBusyFiletypeandkLastMagicBusyFiletype.Checking the
ExtendedFileInfoextendedFinderFlagsto see ifkExtendedFlagObjectIsBusyis set.Running
GetFileInfo -abfrom the shell.
All of these report that the file the Finder is copying to is not open.
Using lsof does detect that the file is open, but (a) I don't want to call lsof from my application, and (b) my understanding is that it relies on private API so looking at its source wouldn't help.