title: Simple way to read local file using Swift?
body: <p>I'm trying to learn the new Swift programming language. It looks great, but I'm having a difficult time doing something as simple as reading the content of a local .txt file.</p>
  
  <p>I have tried the few examples I could find through Google, but they give compile errors, like this answer here: <a href="https://stackoverflow.com/questions/24097826/read-and-write-data-from-text-file">Read and write data from text file</a>
  If I tweak the code a bit, it works, but can only read from a special location within the project.</p>
  
  <p>Why isn't it just as simple to read a .txt file with Swift as it is with for instance Ruby? And how would I go about reading the content of a file located at <code>~/file.txt</code>?</p>
  
  <p>Thnx</p>