diff --git a/src/bin/http_of_dir.ml b/src/bin/http_of_dir.ml index 07e03135..5a37a34f 100644 --- a/src/bin/http_of_dir.ml +++ b/src/bin/http_of_dir.ml @@ -42,6 +42,8 @@ let (//) = Filename.concat let encode_path s = U.percent_encode ~skip:(fun c -> c='/') s +let is_hidden s = String.length s>0 && s.[0] = '.' + let html_list_dir ~top ~parent d : string = let entries = Sys.readdir @@ (top // d) in Array.sort compare entries; @@ -57,8 +59,13 @@ let html_list_dir ~top ~parent d : string = Printf.bprintf body " (parent directory) \n" p; end; Printf.bprintf body "