feat(checks): Add new finction

diff - function which cheks differencies between 2 repo
This commit is contained in:
Black_Raven committed 2026-03-27 12:05:35 +03:00
1 parent 24c9d2e5a9
commit 559af7d594
1 file changed
+17
+17
View File
@@ -0,0 +1,17 @@
use super::*;
use crate::rclone_install::RcloneApp;
use serde_json::Value;
/// Проверить разницу между двумя директориями
pub fn diff(app: &RcloneApp, source: &str, dest: &str) -> Result<Vec<String>, String> {
let output = app.run_command(&["check", source, dest, "--combined", "-"])?;
let mut differences = Vec::new();
for line in output.lines() {
if !line.is_empty() {
differences.push(line.to_string());
}
}
Ok(differences)
}