Skip to main content
April 7, 2015
Question

File Exists Always returning false

  • April 7, 2015
  • 1 reply
  • 300 views

I am using the File.applicationStorageDirectory.resolvePath("myData.db") to reference the location of my SQLite DB file. When I browse to the folder in question I can see that the file is in fact there, however and traces I implement of dbfile.exists is false. It only ever returns true should I use my defaultdb and CopyTo the file of the myData.
What seems to be the issue here?

This topic has been closed for replies.

1 reply

Inspiring
April 7, 2015

That's probably a dumb question but are you sure that you're checking the right folder in Exlorer ? To be sure do a trace(File.applicationStorageDirectory.resolvePath("myData.db").nativePath) !

April 7, 2015

When I trace the nativePath of the file I am trying to find it shows "C:\Users\User\AppData\Roaming\Arakaron.debug\Local Store". This is the exact path I am following in Explorer. Now, instead of applicationStorageDirectory I can do documentsDirectory and it reads that the file is in fact there. With the applicationStorageDirectory it only registers that the file exists after I copy from the embedded db file.