Sorting files list

Can I sort a file list by file name? I’m using readDir, but it seems to order the files by creation date and that’s not what I’d always like.

{{- $pathURL := .Get "pathURL" -}} 
{{- $path := .Get "path" -}} 
{{- $files := readDir $path -}}

<ul>
    {{- range $files }}
        <li><img src="{{ $pathURL }}{{ .Name | relURL }}" /></li>
    {{- end }}
</ul>

Hugo’s sort functions doesn’t seem to be applicable.

Thanks!