Is it possible to watch for file changes (deletion, creation, edit) in Dart, like in NodeJS?
I do not seem to be able to find an answer to this, is it possible that it will be implemented in the future?
Is it possible to watch for file changes (deletion, creation, edit) in Dart, like in NodeJS?
I do not seem to be able to find an answer to this, is it possible that it will be implemented in the future?
You want to take a look at FileSystemEntity.watch() method. However due to platform differences some platforms provide better support than others. In particular, on Windows you can only watch a Directory, and not just an individual file. On Linux you can watch Files or Directories but not recursively watch Directories. And MacOS supports all of the above.
There is also a watcher package on Pub, however at this time I cannot find any reference to the API documentation associated with this package.