copy files
This commit is contained in:
@@ -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()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user