feat(web): panneau Fichiers — navigation projet + téléchargements fichier/dossier ZIP — #211

This commit is contained in:
2026-08-15 10:38:53 +02:00
parent bb1fdecf7c
commit 79fc3d184d
22 changed files with 1648 additions and 78 deletions

View File

@ -537,6 +537,8 @@ pub struct FileMetadata {
pub is_dir: bool,
/// File length in bytes when known.
pub len: Option<u64>,
/// Last modification timestamp as epoch milliseconds when known.
pub modified_at_ms: Option<u64>,
}
/// An owned, boxed stream of PTY output chunks.
@ -1916,12 +1918,29 @@ pub trait FileSystem: Send + Sync {
is_file: false,
is_dir: false,
len: None,
modified_at_ms: None,
})
} else {
Err(FsError::NotFound(path.as_str().to_owned()))
}
}
/// Canonicalizes a path, following symlinks when the backing filesystem does.
///
/// The default preserves source compatibility for remote/test adapters that do
/// not expose canonicalization; local confinement-sensitive use cases should
/// use an adapter that overrides this method.
///
/// # Errors
/// [`FsError`] on failure.
async fn canonicalize(&self, path: &RemotePath) -> Result<RemotePath, FsError> {
if self.exists(path).await? {
Ok(path.clone())
} else {
Err(FsError::NotFound(path.as_str().to_owned()))
}
}
/// Removes a single file. A **missing** file is treated as success (idempotent
/// delete), so this is safe to call best-effort.
///