watchman_client 0.8.0

a client for the Watchman file watching service
Documentation

This crate provides a client to the watchman file watching service.

Start with the Connector struct and use it to connect and return a Client struct, Client::resolve_root to resolve a path and initiate a watch, and then Client::query to perform a query, or Client::subscribe to subscribe to file changes in real time.

This example shows how to connect and expand a glob from the current working directory:

use watchman_client::prelude::*;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut client = Connector::new().connect().await?;
let resolved = client
.resolve_root(CanonicalPath::canonicalize(".")?)
.await?;

// Basic globs -> names
let files = client.glob(&resolved, &["**/*.rs"]).await?;
println!("files: {:#?}", files);
Ok(())
}