Watching for a file
-
I'm sure there is a class to do what I want in the .NET Framework but I cannot remember what it is called right now. I am writing a service that will sit and wait for a new file to appear in a specific directory. It will then process the file and move it to an archive directory. I just need a pointer to the class/method that will allow me to watch the directory. My other solution is to read the contents of the directory every few seconds and process the files, but I am sure there is already a pre-existing solution that will do that for me. Can any one point me in the right direction? Or is this a fictional class that I drempt up somewhere?
-
I'm sure there is a class to do what I want in the .NET Framework but I cannot remember what it is called right now. I am writing a service that will sit and wait for a new file to appear in a specific directory. It will then process the file and move it to an archive directory. I just need a pointer to the class/method that will allow me to watch the directory. My other solution is to read the contents of the directory every few seconds and process the files, but I am sure there is already a pre-existing solution that will do that for me. Can any one point me in the right direction? Or is this a fictional class that I drempt up somewhere?
-
I'm sure there is a class to do what I want in the .NET Framework but I cannot remember what it is called right now. I am writing a service that will sit and wait for a new file to appear in a specific directory. It will then process the file and move it to an archive directory. I just need a pointer to the class/method that will allow me to watch the directory. My other solution is to read the contents of the directory every few seconds and process the files, but I am sure there is already a pre-existing solution that will do that for me. Can any one point me in the right direction? Or is this a fictional class that I drempt up somewhere?