[osx] file copy completed?

hey folks,

does anybody know how to determine if a given file is still being copied? i’m writing a batch processor to work on big video files – and the software likes reading the files before they’ve finished copying over.

i’m not sure if this is a file thing, a directory thing – or a system thing. The only lead I have is using unix’s lsof command to see which files are currently open, but that seems like overkill (would have to sort through 100s of files).

thanks for any advice/direction on this,


Try looking at the copy functionality via Poco:





Thanks, Joel, I’ll take a look at this.

The copying will actually be done outside of the oF app, but it looks like the I might be able to use some of Poco’s File class’ functionality to determine if a file has finished copying.

It seems likely that the file modification date will be extremely useful.

All the best,


So File::getSize() does the trick.

If the value doesn’t change after a few consecutive readings, it’s probably safe to say that it’s finished copying.