TListView Sorting

A newbie Q:

I have a TListView that shows the filename, filesize, and date of files
in a specified dir.  I would like to sort this information by any of
the three categories AND have the dirs always appear before the files.
I'm assuming I should sort this data before i pass it to the TListView
but i'm not sure how to do this.

Thanks