Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify PollWatcher to support pseudo filesystems like sysfs/procfs #396

Merged
merged 13 commits into from Apr 28, 2022

Commits on Apr 28, 2022

  1. Modify PollWatcher to support pseudo filesystems like sysfs/procfs

    Technically this means that you can now construct an instance of
    PollWatcher that performs full file contents hashing to augment the
    mtime comparison.  This works well for pseudo filesystems that often
    don't adhere to durable filesystem metadata norms like accurate file
    sizes, modification times, etc.
    
    Closes notify-rs#391
    jasta committed Apr 28, 2022
    Configuration menu
    Copy the full SHA
    a8ea074 View commit details
    Browse the repository at this point in the history
  2. Apply cargo fmt

    jasta committed Apr 28, 2022
    Configuration menu
    Copy the full SHA
    bce48ad View commit details
    Browse the repository at this point in the history
  3. raise MSRV for 1.50

    0xpr03 authored and jasta committed Apr 28, 2022
    Configuration menu
    Copy the full SHA
    0c37969 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b24537c View commit details
    Browse the repository at this point in the history
  5. Fixed improper use of read loop

    jasta committed Apr 28, 2022
    Configuration menu
    Copy the full SHA
    655fce5 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    df30349 View commit details
    Browse the repository at this point in the history
  7. Add example of new PollWatcher compare_contents feature

    The example shows how to use this to effectively watch pseudo
    filesystems like those through sysfs (i.e. /sys/).  The example
    by default will only work on Linux but does demonstrate well that it
    works where the previous metadata only approach would not.
    
    Sample output:
    
      Trying "/sys/class/net/lo/statistics/tx_bytes", use `ping localhost` to see changes!
      watching ["/sys/class/net/lo/statistics/tx_bytes"]...
      changed: Event { kind: Modify(Data(Any)), paths: ["/sys/class/net/lo/statistics/tx_bytes"], attr:tracker: None, attr:flag: None, attr:info: None, attr:source: None }
      changed: Event { kind: Modify(Data(Any)), paths: ["/sys/class/net/lo/statistics/tx_bytes"], attr:tracker: None, attr:flag: None, attr:info: None, attr:source: None }
      changed: Event { kind: Modify(Data(Any)), paths: ["/sys/class/net/lo/statistics/tx_bytes"], attr:tracker: None, attr:flag: None, attr:info: None, attr:source: None }
      changed: Event { kind: Modify(Data(Any)), paths: ["/sys/class/net/lo/statistics/tx_bytes"], attr:tracker: None, attr:flag: None, attr:info: None, attr:source: None }
    jasta committed Apr 28, 2022
    Configuration menu
    Copy the full SHA
    1d50806 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    d42ec0e View commit details
    Browse the repository at this point in the history
  9. run nix test not on windows

    0xpr03 authored and jasta committed Apr 28, 2022
    Configuration menu
    Copy the full SHA
    d12611c View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    09122bf View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    8a65496 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    6e2b9ab View commit details
    Browse the repository at this point in the history
  13. fix windows compilation of example

    0xpr03 authored and jasta committed Apr 28, 2022
    Configuration menu
    Copy the full SHA
    5a53306 View commit details
    Browse the repository at this point in the history