   defp get_sortfn(:size), do: &sortfn_size/2
   defp get_sortfn(:size_rev), do: &sortfn_size_rev/2
 
-  @spec map_sortopt(atom()) ::
+  @spec map_sortopt(sorttype) ::
     %{:name => String.t, :mtime => String.t, :size => String.t}
 
   defp map_sortopt(:none) do

  end

  # null directory is allowed here
  defp allowed?(_only, _prefix, nil), do: false
  defp allowed?([], [], _list), do: true
  defp allowed?(_only, _prefix, []), do: false

    conn
  end

  @spec uri_decode(binary) :: binary

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