diff --git a/bin/fud/fu/src/main.rs b/bin/fud/fu/src/main.rs index 3c3127bed..39d7ffbae 100644 --- a/bin/fud/fu/src/main.rs +++ b/bin/fud/fu/src/main.rs @@ -72,10 +72,10 @@ enum Subcmd { files: Option>, }, - /// Put a file onto the fud network + /// Put a file or directory onto the fud network Put { - /// File name - file: String, + /// File path or directory path + path: String, }, /// List resources @@ -269,8 +269,8 @@ impl Fu { } } - async fn put(&self, file: String) -> Result<()> { - let req = JsonRequest::new("put", JsonValue::Array(vec![JsonValue::String(file)])); + async fn put(&self, path: String) -> Result<()> { + let req = JsonRequest::new("put", JsonValue::Array(vec![JsonValue::String(path)])); let rep = self.rpc_client.request(req).await?; match rep { JsonValue::String(id) => { @@ -578,7 +578,7 @@ fn main() -> Result<()> { match args.command { Subcmd::Get { hash, path, files } => fu.get(hash, path, files, ex.clone()).await, - Subcmd::Put { file } => fu.put(file).await, + Subcmd::Put { path } => fu.put(path).await, Subcmd::Ls {} => fu.list_resources().await, Subcmd::Watch {} => fu.watch(ex.clone()).await, Subcmd::Rm { hash } => fu.remove(hash).await,