Let\'s say you had an external process writing files to some directory, and you had a separate process periodically trying to read files from this directory. The problem to
You could use an external marker file. The writing process could create a file XYZ.lock before it starts creating file XYZ, and delete XYZ.lock after XYZ is completed. The reader would then easily know that it can consider a file complete only if the corresponding .lock file is not present.