{ "id": "79305", "key": "AC-3083", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2011-08-25T16:59:46.000+0000", "created": "2011-08-16T05:24:06.000+0000", "labels": [ "android", "filesystem", "mobile" ], "versions": [], "issuelinks": [], "assignee": { "name": "tguntharp", "key": "tguntharp", "displayName": "Tony Guntharp", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:48:08.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "The exists() function of the Titanium.Filesystem.File always returns true on Android, even when the file does not actually exist.\r\n\r\n{code:javascript|title=app.js}\r\nvar fileDoesNotExist = Titanium.Filesystem.getFile(Titanium.Filesystem.resourcesDirectory, 'this-file-does-not-exist.js');\r\nvar fileDoesExist = Titanium.Filesystem.getFile(Titanium.Filesystem.resourcesDirectory, 'app.js');\r\n\r\nvar label = Titanium.UI.createLabel({\r\n color: '#FFF'\r\n});\r\nlabel.text = 'Test presence of file that exists => ' + fileDoesExist.exists() +\r\n '\\nTest presence of file that does not exist => ' + fileDoesNotExist.exists();\r\n\r\nvar win = Titanium.UI.createWindow({\r\n backgroundColor: '#000'\r\n});\r\nwin.add(label);\r\nwin.open();\r\n{code}\r\n\r\nI have tested this with both Android 2.1.1 and Android 2.3.3, using the latest stable Titanium Mobile SDK 1.7.2", "attachment": [], "flagged": false, "summary": "File.exists on Android always returns true", "creator": { "name": "matthew.oriordan", "key": "matthew.oriordan", "displayName": "Matthew O'Riordan", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "matthew.oriordan", "key": "matthew.oriordan", "displayName": "Matthew O'Riordan", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium SDK version: 1.7.2.97c3689.\r\nPlatform & version: Android 2.1.1 and Android 2.3.3, OSX 10.7 (Lion)\r\nDevice Details: Android 2.1.1 and Android 2.3.3\r\nHost Operating System: OSX 10.7\r\nTitanium Studio version: Titanium Studio, build: 1.0.2.201107130739", "comment": { "comments": [ { "id": "162923", "author": { "name": "matthew.oriordan", "key": "matthew.oriordan", "displayName": "Matthew O'Riordan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "BTW. I have done some basic tests and this seems to be an issue with 1.7.2, 1.7.3 but not with 1.7.1", "updateAuthor": { "name": "matthew.oriordan", "key": "matthew.oriordan", "displayName": "Matthew O'Riordan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-16T06:09:04.000+0000", "updated": "2011-08-16T06:09:04.000+0000" }, { "id": "164089", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Thanks for the excellent code. I've moved this information to the existing ticket, TIMOB-4469.\n\nCheers", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-08-25T16:59:46.000+0000", "updated": "2011-08-25T16:59:46.000+0000" }, { "id": "168226", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Closing due to inactivity.", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-10-07T05:47:57.000+0000", "updated": "2011-10-07T05:47:57.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }