diff options
author | Lzzzt <liuzitao0123@gmail.com> | 2023-10-27 13:25:57 +0000 |
---|---|---|
committer | Lzzzt <liuzitao0123@gmail.com> | 2025-03-03 06:49:25 +0000 |
commit | aefe3683d3ff0d579e79f06ccdc7e408ae9b3a4a (patch) | |
tree | cf0cb1d515d74370fda14b84beb79d8e28517684 /src/args.rs | |
parent | Add CHANGELOG entry for #1431 (diff) | |
download | miniserve-aefe3683d3ff0d579e79f06ccdc7e408ae9b3a4a.tar.gz miniserve-aefe3683d3ff0d579e79f06ccdc7e408ae9b3a4a.zip |
Show File Size in Bytes
Add a cli option that show file size in bytes rather than KB or MB, etc.
Diffstat (limited to 'src/args.rs')
-rw-r--r-- | src/args.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/args.rs b/src/args.rs index 72ade7b..783d671 100644 --- a/src/args.rs +++ b/src/args.rs @@ -350,6 +350,10 @@ pub struct CliArgs { /// Currently incompatible with -P|--no-symlinks (see https://github.com/messense/dav-server-rs/issues/37) #[arg(long, env = "MINISERVE_ENABLE_WEBDAV", conflicts_with = "no_symlinks")] pub enable_webdav: bool, + + /// Show served file size in exact bytes. + #[arg(long, default_value = "false", env = "MINISERVE_SHOW_SIZE_IN_BYTE")] + pub show_size_in_byte: bool, } /// Checks whether an interface is valid, i.e. it can be parsed into an IP address |