I am trying to check if file exist at the path in swift 3 but it always shows "NO FILE EXIST"
I have also tried it with atPath: self.strTitle+"/back/index.html" and even this doesn't work.
here strTitle is a file path located inside asset folder and is read through an array. There lies two pages one on the back side and one on the front. So there is front for all but back pages are limited to few. And this is where it breaks.
print("STR TITLE:: ",self.strTitle) . // STR TITLE = assets/a6th_nerve_palsy
let fileManager : FileManager = FileManager.default
if fileManager.fileExists(atPath: self.strTitle+"/back/index"){
print("FILE EXIST")
}else{
print("NO FILE EXIST")
}
Thanks in advance :)