Quantcast
Channel: Appcelerator Developer Center Q&A Tag Feed (device)
Viewing all articles
Browse latest Browse all 250

Check file.exists() in Resource directory

0
0

Hello all,

I'm trying to check a file for existing in a subdirectory of the Resources directory. Strange thing is that it works on the iOs simulator, but not on my iPhone running 7.1

This is the code:

var controllerName = 'ui/common/Login/' + loginController + '.js'; 
var file = Ti.Filesystem.getFile(Titanium.Filesystem.resourcesDirectory, controllerName);
if (!file.exists()) loginController = '';
Does anybody know? I'm using 3.2.2 SDK

Viewing all articles
Browse latest Browse all 250

Latest Images

Trending Articles





Latest Images