tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: libexec/httpd and unsorted directory index



On Mon, 7 Jan 2008, Jeremy C. Reed wrote:

httpd(8) provides -X for generating index.

src/libexec/httpd/dir-index-bozo.c uses opendir/readdir with no sorting.

Looking at long index like under the /pub/pkgsrc/... directories is a
little difficult because entries are not sorted alphabetically nor by
modification time.

Should it use glob or scandir with alphasort or other?

        If its going to sort it probably makes sense to provide the
        option of sort key, at least filename & mod asce/desc and
        possibly even size, eg "-k {path,size,mtime}". What to do
        for descending? '-k -size' (ick)

--
                David/absolute       -- www.NetBSD.org: No hype required --



Home | Main Index | Thread Index | Old Index