diff --git a/files.go b/files.go index 6097906..46d5493 100644 --- a/files.go +++ b/files.go @@ -6,9 +6,10 @@ import ( "net/http" "os" "path/filepath" + "time" ) -const fileElement = "

%v

" +const fileElement = "

%v

%v

" func filesRequest(w http.ResponseWriter, r *http.Request) { partPath := filepath.Clean(r.URL.Path) @@ -38,7 +39,8 @@ func filesRequest(w http.ResponseWriter, r *http.Request) { if f.IsDir() { continue } - pageContent += fmt.Sprintf(fileElement, filepath.Join(partPath, f.Name()), f.Name()) + inf, _ := f.Info() + pageContent += fmt.Sprintf(fileElement, filepath.Join(partPath, f.Name()), f.Name(), inf.ModTime().Format(time.DateOnly)) } } else { http.ServeFile(w, r, path)