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

fs-index: Filesystem monitoring using notify-rs #21

Open
tareknaser opened this issue Mar 19, 2024 · 0 comments
Open

fs-index: Filesystem monitoring using notify-rs #21

tareknaser opened this issue Mar 19, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@tareknaser
Copy link
Collaborator

Description

Use notify-rs 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 <path>

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 <path> to add a directory to the watch list.
  • ark-cli watch unpin <path> 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/<username>/.ark/directories_to_watch, to store the list of directories to monitor.

@tareknaser tareknaser added the enhancement New feature or request label Mar 19, 2024
@tareknaser tareknaser self-assigned this Mar 19, 2024
@kirillt kirillt moved this to In Progress in Development Mar 20, 2024
@kirillt kirillt changed the title Filesystem monitoring using notify-rs fs-index: Filesystem monitoring using notify-rs Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: In Progress
Development

No branches or pull requests

1 participant