Add rs-notify implementation of fs::watch
(#9040)
This PR simplifies the Zed file system abstraction and implements `Fs::watch` for linux and windows. TODO: - [x] Figure out why this fails to initialize the file watchers when we have to initialize the config directory paths, but succeeds on subsequent runs. - [x] Fix macOS dependencies on old fsevents::Event crate Release Notes: - N/A
This commit is contained in:
parent
456efb53ad
commit
ca696fd5f6
13 changed files with 478 additions and 493 deletions
|
@ -296,10 +296,10 @@ impl ExtensionStore {
|
|||
let reload_tx = this.reload_tx.clone();
|
||||
let installed_dir = this.installed_dir.clone();
|
||||
async move {
|
||||
let mut events = fs.watch(&installed_dir, FS_WATCH_LATENCY).await;
|
||||
while let Some(events) = events.next().await {
|
||||
for event in events {
|
||||
let Ok(event_path) = event.path.strip_prefix(&installed_dir) else {
|
||||
let mut paths = fs.watch(&installed_dir, FS_WATCH_LATENCY).await;
|
||||
while let Some(paths) = paths.next().await {
|
||||
for path in paths {
|
||||
let Ok(event_path) = path.strip_prefix(&installed_dir) else {
|
||||
continue;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue