afc mkdir

This commit is contained in:
Jackson Coxson
2025-04-05 11:23:51 -06:00
parent 4d893e9d8c
commit 06766849f6
3 changed files with 41 additions and 2 deletions

View File

@@ -41,6 +41,11 @@ async fn main() {
.about("Lists the items in the directory")
.arg(Arg::new("path").required(true).index(1)),
)
.subcommand(
Command::new("mkdir")
.about("Creates a directory")
.arg(Arg::new("path").required(true).index(1)),
)
.subcommand(
Command::new("remove")
.about("Remove a provisioning profile")
@@ -78,6 +83,9 @@ async fn main() {
let path = matches.get_one::<String>("path").expect("No path passed");
let res = afc_client.list_dir(path).await.expect("Failed to read dir");
println!("{path}\n{res:#?}");
} else if let Some(matches) = matches.subcommand_matches("mkdir") {
let path = matches.get_one::<String>("path").expect("No path passed");
afc_client.mk_dir(path).await.expect("Failed to mkdir");
} else if let Some(matches) = matches.subcommand_matches("remove") {
let path = matches.get_one::<String>("id").expect("No path passed");
} else if let Some(matches) = matches.subcommand_matches("info") {