fs.watch( 'example.xml', function ( curr, prev ) {    // on file change we can read the new xml    fs.readFile( 'example.xml','utf8', function ( err, data ) {      if ( err ) throw err;      console.dir(data);      console.log('Done');    });  }); OUTPUT:
- some data
- Done X 1
- some data
- Done X 2
It is my usage fault or ..?
The fs.watch api:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With