Forum Discussion

rmnrdi's avatar
rmnrdi
Contributor
6 years ago
Solved

Using System.IO.FileSystem.Watcher

I want to monitor a folder for changes and FileSystemWatcher looks like what I need, but I'm having trouble bringing it into my project.

I was able to bring the exact library in via Project Properties CLR GAC, but I'm having trouble bringing it up in my project.

 

I can only get this far:

dotNET.System_IO. 

 

Is this even possilbe?

 

Here's the FileSystemWatcher page from Microsoft.

https://docs.microsoft.com/en-us/dotnet/api/system.io.filesystemwatcher?view=netframework-4.7.2 

 

Any help would be much appreciated,

Rob

19 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi Rob,

     

    I am pretty sure that it is not possible to instantiate a .Net class, provide it with event handlers and start its asynchronious execution using scripting language.

    Can you describe your scenario with more details? Maybe some other approach could fit your needs?

     

    • rmnrdi's avatar
      rmnrdi
      Contributor

      We have a program that retrieves lenses from a source folder, processes them, then creates new files and places them in various target directories.

      We need a way to monitor a given target directory for changes and then continue with the rest of the test.

       

      Thanks,

      Rob