diff options
Diffstat (limited to 'src/args.rs')
-rw-r--r-- | src/args.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/args.rs b/src/args.rs index 4f0dbf7..bb52824 100644 --- a/src/args.rs +++ b/src/args.rs @@ -47,6 +47,14 @@ struct CLIArgs { /// Do not follow symbolic links #[structopt(short = "P", long = "no-symlinks")] no_symlinks: bool, + + /// Enable file uploading + #[structopt(short = "u", long = "upload-files")] + file_upload: bool, + + /// Enable overriding existing files during file upload + #[structopt(short = "o", long = "overwrite-files")] + overwrite_files: bool, } /// Checks wether an interface is valid, i.e. it can be parsed into an IP address @@ -100,5 +108,7 @@ pub fn parse_args() -> crate::MiniserveConfig { path_explicitly_chosen, no_symlinks: args.no_symlinks, random_route, + overwrite_files: args.overwrite_files, + file_upload: args.file_upload, } } |