tauri
tauri copied to clipboard
[feat] Better FsScope Event informations
Describe the problem
Using FsScope Event when using the persisted-scope plugin(monorepo), I found the event data a bit lacking. We are only given the allowed/forbidden path.
Describe the solution you'd like
It would be useful to also get other information like:
- Is it a file, a directory ?
- In the case of a directory, is it recursive ?
An idea would be:
#[derive(Debug, Clone)]
pub enum FsEvent {
/// A path has been allowed.
PathAllowed(FsEventData),
/// A path has been forbidden.
PathForbidden(FsEventData),
}
struct FsEventData {
path: PathBuf
target: TargetType
}
enum TargetType {
File,
// isRecursive ?
Directory(bool)
}
But I might be forgetting something that could be useful to add.
I'll be happy to help for this feature
Alternatives considered
No response
Additional context
No response