<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://elixirblocks.com/index.php?action=history&amp;feed=atom&amp;title=Compare_Identical_Files</id>
	<title>Compare Identical Files - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://elixirblocks.com/index.php?action=history&amp;feed=atom&amp;title=Compare_Identical_Files"/>
	<link rel="alternate" type="text/html" href="http://elixirblocks.com/index.php?title=Compare_Identical_Files&amp;action=history"/>
	<updated>2026-06-02T07:35:15Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.1</generator>
	<entry>
		<id>http://elixirblocks.com/index.php?title=Compare_Identical_Files&amp;diff=1842&amp;oldid=prev</id>
		<title>Admin: Created page with &quot;&lt;source&gt; defmodule FileComparator do   def compare(file1, file2) do     IO.inspect File.cwd!()     content1 = read_file(file1)     content2 = read_file(file2)      if content1 == content2 do       IO.puts(&quot;The files have identical content.&quot;)     else       IO.puts(&quot;The files have different content.&quot;)     end   end    defp read_file(file_path) do     case File.read(file_path) do       {:ok, content} -&gt; content       {:error, reason} -&gt; raise &quot;Failed to read #{file_path}:...&quot;</title>
		<link rel="alternate" type="text/html" href="http://elixirblocks.com/index.php?title=Compare_Identical_Files&amp;diff=1842&amp;oldid=prev"/>
		<updated>2024-06-20T19:44:16Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;source&amp;gt; defmodule FileComparator do   def compare(file1, file2) do     IO.inspect File.cwd!()     content1 = read_file(file1)     content2 = read_file(file2)      if content1 == content2 do       IO.puts(&amp;quot;The files have identical content.&amp;quot;)     else       IO.puts(&amp;quot;The files have different content.&amp;quot;)     end   end    defp read_file(file_path) do     case File.read(file_path) do       {:ok, content} -&amp;gt; content       {:error, reason} -&amp;gt; raise &amp;quot;Failed to read #{file_path}:...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;source&amp;gt;&lt;br /&gt;
defmodule FileComparator do&lt;br /&gt;
  def compare(file1, file2) do&lt;br /&gt;
    IO.inspect File.cwd!()&lt;br /&gt;
    content1 = read_file(file1)&lt;br /&gt;
    content2 = read_file(file2)&lt;br /&gt;
&lt;br /&gt;
    if content1 == content2 do&lt;br /&gt;
      IO.puts(&amp;quot;The files have identical content.&amp;quot;)&lt;br /&gt;
    else&lt;br /&gt;
      IO.puts(&amp;quot;The files have different content.&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  defp read_file(file_path) do&lt;br /&gt;
    case File.read(file_path) do&lt;br /&gt;
      {:ok, content} -&amp;gt; content&lt;br /&gt;
      {:error, reason} -&amp;gt; raise &amp;quot;Failed to read #{file_path}: #{reason}&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
FileComparator.compare(&amp;quot;c:/Users/william.turner/Desktop/sandbox/app/files/example.md&amp;quot;, &amp;quot;c:/Users/william.turner/Desktop/sandbox/app/files/example_2.md&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>