There are ways you can do this, but not very elegantly and not without race conditions.
I recommend that you use a different system instead:
- Have the upload process upload files with a temporary filename (myfilename.tmp)
- Once the upload is complete, have the uploader rename the file to its final filename
- Renaming a file is an atomic process - it's not possible to see a rename half-completed
- Your reader process should ignore the temporary files as they might not be finished yet
This is far more robust than checking the timestamp, etc
Mark