A
Andrew Cooper
I've got an application that I'm modifying and the client needs it to
watch a particular file and then do some stuff when that file gets
modified. For example, let's say the file is C:\Test.dat and that it
looks like this...
AcctNum, 500
SomeValue, 4500
Periodically there is another program that changes the Test.dat file
values. The application I'm modifying needs to detect that the Test.dat
file has been modified, read it and then do some stuff with the values.
This isn't supder difficult. I can just place a timer in the
application that checks the File.GetLastWriteTime method for Test.dat
and then acts appropriately. However, that seems kind of inefficient.
Is there an event or something that I can latch onto to accomplish the
same thing without having to constantly fire a timer off?
Thanks for any help.
Andrew Cooper
watch a particular file and then do some stuff when that file gets
modified. For example, let's say the file is C:\Test.dat and that it
looks like this...
AcctNum, 500
SomeValue, 4500
Periodically there is another program that changes the Test.dat file
values. The application I'm modifying needs to detect that the Test.dat
file has been modified, read it and then do some stuff with the values.
This isn't supder difficult. I can just place a timer in the
application that checks the File.GetLastWriteTime method for Test.dat
and then acts appropriately. However, that seems kind of inefficient.
Is there an event or something that I can latch onto to accomplish the
same thing without having to constantly fire a timer off?
Thanks for any help.
Andrew Cooper