resolve Ambiguous use of appendingPathComponent error
<p>The code below worked great in an app I published and updated multiple times using swift 2.2. I just migrated over to swift 3 and now I get the following compile time error; "Ambiguous use of appendingPathComponent" with the line:</p>

<pre><code> let PDFPathFileName = documentDirectory.appendingPathComponent(fileName as String)
</code></pre>

<p>In this:</p>

<pre><code> func returnPDFPath() -&gt; String {
      let path:NSArray =         NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true) as NSArray
      let documentDirectory: AnyObject = path.object(at: 0) as AnyObject
      let PDFPathFileName = documentDirectory.appendingPathComponent(fileName as String)

      return PDFPathFileName
 }

 @IBAction func reveiwPDFSendCliked(_ sender: AnyObject) {

    let pdfPathWithFileName = returnPDFPath()

    generatePDFs(pdfPathWithFileName)
 }
</code></pre>

<p>This code is responsible for returning the file path to the documentDirectory that will be used to save a PDF file when a user clicks a review and save PDF button. Any suggestions would be greatly appreciated.</p>