ARK-Builders / ARK-Builders/ark-core
`fs-index`: Filesystem monitoring using `notify-rs`
- Dominant language
- Rust
- Stars
- 10
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
## Description
Use [`notify-rs`](https://github.com/notify-rs/notify) to enable filesystem monitoring for a specified root folder. This functionality would automatically update the index if any changes were detected within the watched directory.
### Motivation
- Enhance UX with a straightforward solution for keeping the index up-to-date.
### Proposal
We've decided to add a method `ResourceIndex::watch_index()` to monitor a specific directory for changes and update the index whenever a change is detected.
For interacting with this method, we'll add a command to `ark-cli` which is `ark-cli watch `
To further build on this, we plan to enhance this functionality to enable watching multiple directories simultaneously. This will be possible through the following commands:
- `ark-cli watch --all` to watch all specified directories.
- `ark-cli watch pin ` to add a directory to the watch list.
- `ark-cli watch unpin ` to stop watching a directory.
- `ark-cli watch list` to list the directories currently being watched.
We can also have a global configuration file, such as `/Users//.ark/directories_to_watch`, to store the list of directories to monitor.
Contributor guide
Assessment
This issue has not been assessed yet.