afero icon indicating copy to clipboard operation
afero copied to clipboard

file change notify, like github.com/fsnotify/fsnotify?

Open corentone opened this issue 7 years ago • 4 comments

Hello!

In our infrastructure, we regularly refresh a config file and need to detect file changes in order to properly reload. I've been a regular user of afero.Fs and was looking into the best way to do it...

Would you have suggestions? We currently use both the regular OS Fs and the in-Mem Fs.

For the OS Fs, I was looking into: https://github.com/fsnotify/fsnotify

Thanks!

corentone avatar Aug 20 '17 20:08 corentone

Great idea :)

purpleidea avatar Aug 21 '17 08:08 purpleidea

How would you like to use that feature? We could use the fsnotify for the standard OS filesystem but for all the other use cases we would need to implement it in the MemMapFs and so on.

mbertschler avatar Oct 03 '17 22:10 mbertschler

@mbertschler Of course, although while OS would use fnotify, MemMapFs could also implement this by easily adding a hook onto any chmod or write call to any of the files. Similar patterns exist for the other backends.

purpleidea avatar Oct 04 '17 01:10 purpleidea

Any progress on this feature? Does fsnotify work for OsFs out of the box?

akuzia avatar Feb 16 '21 14:02 akuzia