copy files

This commit is contained in:
2025-07-30 23:35:30 +02:00
parent 956c0c6f65
commit ea09b9c470
21 changed files with 552 additions and 46 deletions

View File

@@ -7,8 +7,8 @@ use crate::domain::warren::{
user::{ListAllUsersAndWarrensResponse, LoginUserResponse, User},
user_warren::UserWarren,
warren::{
Warren, WarrenLsResponse, WarrenMkdirResponse, WarrenMvResponse, WarrenRmResponse,
WarrenSaveResponse, WarrenTouchResponse,
Warren, WarrenCpResponse, WarrenLsResponse, WarrenMkdirResponse, WarrenMvResponse,
WarrenRmResponse, WarrenSaveResponse, WarrenTouchResponse,
},
},
ports::{AuthNotifier, FileSystemNotifier, WarrenNotifier},
@@ -98,6 +98,15 @@ impl WarrenNotifier for NotifierDebugLogger {
warren.name()
);
}
async fn warren_cp(&self, response: &WarrenCpResponse) {
tracing::debug!(
"[Notifier] Copied file {} to {} in warren {}",
response.base().path(),
response.base().target_path(),
response.warren().name()
);
}
}
impl FileSystemNotifier for NotifierDebugLogger {
@@ -128,6 +137,10 @@ impl FileSystemNotifier for NotifierDebugLogger {
async fn touch(&self, path: &AbsoluteFilePath) {
tracing::debug!("[Notifier] Touched file {}", path);
}
async fn cp(&self, path: &AbsoluteFilePath, target_path: &AbsoluteFilePath) {
tracing::debug!("[Notifier] Copied file {} to {}", path, target_path);
}
}
impl AuthNotifier for NotifierDebugLogger {
@@ -330,4 +343,14 @@ impl AuthNotifier for NotifierDebugLogger {
user.id()
)
}
async fn auth_warren_cp(&self, user: &User, response: &WarrenCpResponse) {
tracing::debug!(
"[Notifier] Copied file {} to {} in warren {} for authenticated user {}",
response.base().path(),
response.base().target_path(),
response.warren().name(),
user.id()
)
}
}