title: Remove all files from within documentDirectory in Swift
body: <p>I am making an audio app, and the user can download files locally stored to the <code>documentDirectory</code> using <code>FileManager</code>.</p>
  
  <p>Next, I'd like to allow the user to delete all files using a button. In the documentation, there is a <a href="https://developer.apple.com/documentation/foundation/filemanager/1413590-removeitem" rel="noreferrer">method to remove items</a>.</p>
  
  <p>Here's my code: </p>
  
  <pre><code>@IBAction func deleteDirectoryButton(_ sender: Any) {
  
      let documentsUrl =  FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first!
  
          do {
              try FileManager.default.removeItem(at: documentsUrl, includingPropertiesForKeys: nil, options: [])
  
          } catch let error {
              print(error)
          }
      }
  </code></pre>
  
  <p>Unfortunately, this won't build with an error <code>Ambiguous reference to member 'removeItem(atPath:)'</code>. </p>
  
  <p>Is there a better approach to access the <code>documentDirectory</code> and remove all files from the directory in one swoop? </p>