I have tried:
Checking the
FSCatalogInfo
nodeFlags
to see ifkFSNodeForkOpenBit
is set (usingkFSNodeForkOpenMask
).Checking whether the creator code is between
kFirstMagicBusyFiletype
andkLastMagicBusyFiletype
.Checking the
ExtendedFileInfo
extendedFinderFlags
to see ifkExtendedFlagObjectIsBusy
is set.Running
GetFileInfo -ab
from 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.