title: Write to file not working (Swift 4)
body: <p>I am starting learning about Swift programming. Up to now, I have already developed my first working app. Although simple, it is a very useful one. But with the introduction of Swift 4 and XCode 9, I'm facing some headaches. Right now I am trying to write a small piece of code to write a string to a file, like this:</p>
  
  <pre><code>let fileName = "myFile.txt"
  let path = NSURL(fileURLWithPath: 
  NSTemporaryDirectory()).appendingPathComponent(fileName)
  var myText = "Some text to write to file"
  do {
      try myText.write(to: path!, atomically: true, encoding: UTF8)
  } catch {
      // Handle error
  }
  </code></pre>
  
  <p>When I write myText.write, XCode suggests the above syntax, but right after I choose it and fill the placeholders, XCode displays the error "Extra argument 'atomically' in call. Note that it is the very structure it suggested. I haven't found any workaround until now. Can anyone help me?  </p>