From 9cfeee0df06ef33052c1933efde74ac9ff3d679a Mon Sep 17 00:00:00 2001 From: sigoden Date: Sat, 25 Jun 2022 09:57:58 +0800 Subject: [PATCH] chore: update args help message and readme --- README.md | 20 ++++++++++---------- src/args.rs | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 52bb3d5..a941468 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ OPTIONS: -b, --bind ... Specify bind address -p, --port Specify port to listen on [default: 5000] --path-prefix Specify an path prefix - --hidden Comma-separated list of names to hide from directory listings + --hidden Hide directories from directory listings, separated by `,` -a, --auth ... Add auth for path --auth-method Select auth method [default: digest] [possible values: basic, digest] -A, --allow-all Allow all operations @@ -126,7 +126,7 @@ Listen on a specific port dufs -p 80 ``` -Hide folders from directory listing +Hide directories from directory listings ``` dufs --hidden .git,.DS_Store @@ -168,23 +168,23 @@ curl -X DELETE http://127.0.0.1:5000/path-to-file Dufs supports path level access control. You can control who can do what on which path with `--auth`/`-a`. ``` -dufs -a @[@] +dufs -a @[@|@*] ``` -- ``: Path to protected -- ``: Account with readwrite permission, required -- ``: Account with readonly permission, optional +- ``: Protected url path +- ``: Account with upload/delete/view/download permission, required +- ``: Account with view/download permission, optional -> `` can be `*` means `` is public, everyone can access/download it. +> `*` means `` is public, everyone can view/download it. For example: ``` dufs -a /@admin:pass@* -a /ui@designer:pass1 -A ``` -- All files/folders are public to access/download. -- Account `admin:pass` can upload/delete/download any files/folders. -- Account `designer:pass1` can upload/delete/download any files/folders in the `ui` folder. +- All files/folders are public to view/download. +- Account `admin:pass` can upload/delete/view/download any files/folders. +- Account `designer:pass1` can upload/delete/view/download any files/folders in the `ui` folder. ## License diff --git a/src/args.rs b/src/args.rs index a91e00b..f072217 100644 --- a/src/args.rs +++ b/src/args.rs @@ -51,8 +51,8 @@ fn app() -> Command<'static> { .arg( Arg::new("hidden") .long("hidden") - .help("Comma-separated list of names to hide from directory listings") - .value_name("names"), + .help("Hide directories from directory listings, separated by `,`") + .value_name("value"), ) .arg( Arg::new("auth")