From 7944db336ca3ef0338369091af60aa2b15789952 Mon Sep 17 00:00:00 2001 From: Dean Li Date: Thu, 3 Jun 2021 21:26:27 +0800 Subject: Implement show symlink destination Add option `show_symlink_info` to represent show symlink info or not. (Default to no) Show symlink destination after symlink symbol in directory listing Resemble `ls -l` and also the short argument select for this feature is also `-l`. Basic testing is included. Related to #499 --- src/config.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/config.rs') diff --git a/src/config.rs b/src/config.rs index e47ffc1..86fe314 100644 --- a/src/config.rs +++ b/src/config.rs @@ -95,6 +95,9 @@ pub struct MiniserveConfig { /// If specified, header will be added pub header: Vec, + /// If specified, symlink destination will be shown + pub show_symlink_info: bool, + /// If enabled, version footer is hidden pub hide_version_footer: bool, @@ -187,6 +190,7 @@ impl MiniserveConfig { dirs_first: args.dirs_first, title: args.title, header: args.header, + show_symlink_info: args.show_symlink_info, hide_version_footer: args.hide_version_footer, tls_rustls_config: tls_rustls_server_config, }) -- cgit v1.2.3