I have a PHP script that opens a local directory for copying and processing some files. But these files can be incomplete, because they are downloaded by the slow FTP process, and I do not want to copy or process files that have not yet been fully downloaded.
Is it possible in PHP to find out that a file is still being copied (i.e. read) or written to?
I need my script to only process files that have been fully downloaded.
Now the ftp process uploads files in parallel, and it takes more than 1 second for every file size change, so this trick now doesn't work for me, and any other method offers
source
share