dimanche 12 février 2017

read a temp folder file in swift 3

Vote count: 0

I have the following Swift 3 code that creates a file path string and checks to see if the file exists on the iPad, but it returns false. I see the file in the folder using the IExplorer app, so I must be creating the wrong file path. How do I create the right file path to read the file shown in the screenshot.

var logPath = FileManager.default.temporaryDirectory.appendingPathComponent("log", isDirectory: true).appendingPathComponent("AwpLog4jInfo").appendingPathExtension("log").absoluteString

if fileManager.fileExists(asPath: logPath) //This equals false. Why?

Screenshot showing the file is on the iPad

asked 55 secs ago

Let's block ads! (Why?)



read a temp folder file in swift 3

Aucun commentaire:

Enregistrer un commentaire