holepunchto / hyperdrive

Hyperdrive is a secure, real time distributed file system
Apache License 2.0
1.86k stars 135 forks source link

Add docs for drive.watch #285

Closed RangerMauve closed 3 years ago

RangerMauve commented 4 years ago

Also clarified that the update event doesn't get emitted unless you're watching files or downloading data.

RangerMauve commented 4 years ago

@andrewosh How does this README change look? :o I think it'd be handy for people trying to listen on updates.

KyleAMathews commented 3 years ago

Is there a way to get what file changed? That's necessary when watching directories.

RangerMauve commented 3 years ago

@KyleAMathews To get the file that changed you'll want to diff against the previous version since that isn't being tracked AFAIK. @mafintosh or @andrewosh might have more insight though.

I usually use this for diffs: https://github.com/pfrazee/diff-file-tree

andrewosh commented 3 years ago

Thanks @RangerMauve, and sorry for missing this one!