External File Update Watcher

Hello,

I’m looking for a reliable and fast way to know if an external file has updated. I’m having the same issues as this older thread: How to watch/synchronise a folder? I’ve looked at three methods, method 1 works reliably but can be slow on larger files:

  1. File Path to Read File (set to Total File) to some null checking incase the file doesn’t exist. Slow for larger files
  2. Use the synchronize attribute on the File Path component, doesn’t work at all, seems like a bug
  3. Some sort of python or C# to watch the file, I can’t get these to auto update like FileSystemWatcher that the Read File component seems to use.

Ideally, the solution is always watching the file and doesn’t need a grasshopper trigger to update. Any help is appreciated.

Sample file (you’ll need to hook in a text file or something on your end):

File Update.gh (13.2 KB)

I still think this is a bug but I found a work around with VB. Here’s the file if anyone else needs it:

Read File Replacement.gh (2.6 KB)