This function is intended to check for the existence of a file in the documents directory. I know for a fact that the file does not exists as I went in to delete it myself but this function always returns ‘true’. is pathForFile finding something that I’m unaware of or is my local variable being given a value somehow? Or am I truly a newb?
Thanks,
local function docFileExists(fileName) local fileNameAt = system.pathForFile( fileName, system.DocumentsDirectory) if fileNameAt then return true else return false end end