M
McFly Racing
I have a file being copied to my server from another server on the network.
My program needs to work with this file when it is received on my server.
The problem I have is that when I go to process the file it may still be
being written to the disk and thus I cannot get a valid handle on it to
perform the necessary operations I need to do.
The code I inherited uses a sleep on the thread that the code is running in.
I am looking for a more elegant solution that does not put the thread to
sleep for some static amount of time. Any suggestions would be greatly
appreciated. Thank you.
My program needs to work with this file when it is received on my server.
The problem I have is that when I go to process the file it may still be
being written to the disk and thus I cannot get a valid handle on it to
perform the necessary operations I need to do.
The code I inherited uses a sleep on the thread that the code is running in.
I am looking for a more elegant solution that does not put the thread to
sleep for some static amount of time. Any suggestions would be greatly
appreciated. Thank you.