     sortfn)
   end
 
-  @typep read_link_info :: {:ok | :error, file_info}
-  @typep name_info :: {String.t, read_link_info}
-
-  @spec validate_query(String.t) :: atom
+  @typep sorttype :: :none | :name | :name_rev |
+                     :mtime | :mtime_rev | :size | :size_rev
+
+  @spec validate_query(String.t) :: sorttype
 
   defp validate_query(""), do: :none
   defp validate_query("name"), do: :name

      footer_html(host)]
  end

  defp dir_file_list(dirpath, sortfn) do
    {:ok, list} = :prim_file.list_dir(dirpath)
    Enum.sort(

    conn
  end

  @spec uri_decode(binary) :: binary

  defp uri_decode(path) do
    try do
      URI.decode(path)
