       [year, month, day, hour, min, sec]))
   end
 
+  @spec file_size_check(file_info) :: non_neg_integer()
+
   defp file_size_check(info) do
     case file_info(info, :type) do
       :regular ->

  defp subset(_, _),
    do: nil

  defp invalid_path?([h|_]) when h in [".", "..", ""], do: true
  defp invalid_path?([h|t]), do: String.contains?(h, ["/", "\\", ":"]) or invalid_path?(t)
  defp invalid_path?([]), do: false

  defp rewrite_nullpath([]), do: ["/"]
  defp rewrite_nullpath(list), do: list
end

    |> halt
  end

  defp serve_directory_listing({:error, conn}, _at, _segments, _query) do
    conn
  end

