From f9b5fc49b123cb4db3941ee2ae9b891f5262deef Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sun, 3 Sep 2023 17:10:06 +0300 Subject: feat(tvix/store/fuse): allow listing This provides an additional configuration flag to the tvix-store mount subcommand, and logic in the fuse module to request listing for the root of the mountpoint. Change-Id: I05a8bc11f7991b574696f27a30afe0f4e718a58c Reviewed-on: https://cl.tvl.fyi/c/depot/+/9217 Autosubmit: flokli Reviewed-by: adisbladis Tested-by: BuildkiteCI --- tvix/store/src/bin/tvix-store.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'tvix/store/src/bin') diff --git a/tvix/store/src/bin/tvix-store.rs b/tvix/store/src/bin/tvix-store.rs index 5b6c98e4ee45..d2a8927351f9 100644 --- a/tvix/store/src/bin/tvix-store.rs +++ b/tvix/store/src/bin/tvix-store.rs @@ -90,6 +90,10 @@ enum Commands { #[arg(long, env, default_value = "grpc+http://[::1]:8000")] path_info_service_addr: String, + + /// Whether to list elements at the root of the mount point. + #[clap(long, short, action)] + list_root: bool, }, } @@ -250,6 +254,7 @@ async fn main() -> Result<(), Box> { blob_service_addr, directory_service_addr, path_info_service_addr, + list_root, } => { let blob_service = blobservice::from_addr(&blob_service_addr)?; let directory_service = directoryservice::from_addr(&directory_service_addr)?; @@ -260,7 +265,12 @@ async fn main() -> Result<(), Box> { )?; tokio::task::spawn_blocking(move || { - let f = FUSE::new(blob_service, directory_service, path_info_service); + let f = FUSE::new( + blob_service, + directory_service, + path_info_service, + list_root, + ); fuser::mount2(f, &dest, &[]) }) .await?? -- cgit 1.4.1