Detecting a change in a file or directory

  • Thread starter Thread starter Nathan Sokalski
  • Start date Start date
N

Nathan Sokalski

I have several pieces of data that I use the HttpApplicationState for,
because they rarely change and are used by everyone. When these pieces of
data are created, they are created either from several files that rarely
change or are a list of the files in a directory that I rarely add or remove
files from. Therefore, I want to be able to detect when a file is added to,
removed from, or modified in one of these directories. Because I create the
HttpApplicationState in the Global.asax.vb file, I need to do the detecting
in there. However, it does not seem to want to let me create a
System.Io.Directory object in that file. How can I detect when a file or
directory is added, removed, or modified? Thanks.
 
Back
Top