5 Answers
5

It's about 2 years too late for you now, but I thought for the sake of anybody finding this later I'd note that you can check the creation date of the file. Finder sets it to kMagicBusyCreationDate (1946-02-14 08:34:56 +0000) while it's copying.

It looks to me like partially copied files have a file type of "brok" and a creator code of "MACS".

I don't believe that the Finder marks in any way the copies of folders that it is in the process of making. The "grayed out" representation is strictly confined to the Finder process that is doing the copying. You can verify this by using Fast User Switching while a folder is copying: as a different user, the folder being copied has a normal appearance in the Finder, and you can open it and watch as sub-files and folders appear. The Finder doesn't seem to reveal any differences about the folder through AppleScript either, and I can't think of any other way to get that information.

This method might be a little kludgey, but I've used it for similar purposes and it may work for you. The basic idea is to attempt opening the file with an exclusive lock, check to see if the open was successful, and then immediately close it again. So, this would look something like:

I've never tried this with a file being copied by the Finder, but it does work when a file is open by another application on the system. I'm not sure if this same method works if you open it as read-only instead of read/write, so that might be another gotcha depending on your requirements.

Thanks. This does detect files being copied by the Finder. Unfortunately, it won't work for folders or for files that the current process doesn't have write permission for.
–
Michael TsaiJan 20 '09 at 16:40

I don't know the exact answer but... Below the POSIX and Carbon file mgr APIs there's another layer that is used by both. It's pretty close to VFS, and uses all lowercase names. You see those calls when you trace FS calls using the command "fs_usage", IIRC.
You may find a working function in those calls. Unfortunately, they're not well documented.
Hope that helps.