title: Why can't I append a String to a NSURL?
body: <p>Appending the .txt file component to the URL path doesn't work:</p>
  
  <pre><code>var error:NSError?
  let manager = NSFileManager.defaultManager()
  let docURL = manager.URLForDirectory(.DocumentDirectory, inDomain:.UserDomainMask, appropriateForURL:nil, create:true, error:&amp;error)
  docURL.URLByAppendingPathComponent("/RicFile.txt") &lt;-- doesn't work
  </code></pre>
  
  <p><p>
  via debugger:
  <p></p>
  
  <pre><code>file:///Users/Ric/Library/Developer/CoreSimulator/Devices/
  &lt;device id&gt;/data/Containers/Data/Application/&lt;app id&gt;/Documents/
  </code></pre>
  
  <p><p>
  Writing a String using <strong>docURL</strong> to a file doesn't work because of the missing file name.
  <p>
  Reason (via error):</p>
  
  <blockquote>
    <p>"The operation couldn’t be completed. Is a directory"</p>
  </blockquote>
  
  <p><p>
  <strong>So Question: Why doesn't the following work?</strong>
  <br/></p>
  
  <pre><code>docURL.URLByAppendingPathComponent("/RicFile.txt")
  </code></pre>