mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-24 15:01:38 +00:00
Enhance VFS watch functionality and introduce recording mode
- Updated the `watch` method in `VfsBackend` to accept a `recursive` parameter, allowing for more flexible directory watching. - Implemented a recording mode in the `Vfs` struct to track accessed paths without immediately watching them, improving performance during read operations. - Added tests to verify the behavior of the new recording mode and ensure correct path tracking. - Enhanced the `StdBackend` and `NoopBackend` implementations to support the updated watch functionality. These changes aim to improve the VFS's ability to manage file system events and enhance user control over watching behavior.
This commit is contained in:
parent
bfb5815f5e
commit
2ea1d49316
8 changed files with 486 additions and 56 deletions
|
|
@ -155,6 +155,8 @@ pub struct InstanceContext {
|
|||
pub path_ignore_rules: Arc<Vec<PathIgnoreRule>>,
|
||||
#[serde(skip_serializing_if = "Vec::is_empty")]
|
||||
pub sync_rules: Vec<SyncRule>,
|
||||
#[serde(skip)]
|
||||
pub sync_scripts_only: bool,
|
||||
}
|
||||
|
||||
impl InstanceContext {
|
||||
|
|
@ -162,6 +164,7 @@ impl InstanceContext {
|
|||
Self {
|
||||
path_ignore_rules: Arc::new(Vec::new()),
|
||||
sync_rules: Vec::new(),
|
||||
sync_scripts_only: false,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue