Hello!
I'm using the FileSystemWatcher to get notified when new files are
created in a directory. Once a file appears in the directory I want to
read it's contents into memory and do some processing.
The problem I'm having is that sometimes the FileSystemWatcher event
gets fired before the file is fully written (it gets fired when the file
is created.. not when it is created+closed).
Is there some way to get notified when the new file is completely
written (closed)?
I'm currently starting another thread that I'm passing the file names
to.. it uses a while loop with a Thread.Sleep to test if the file is
complete before it continues with the processing. But that sucks.
thanks,
Max