{ "id": "76825", "key": "TIMOB-4486", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2011-06-23T11:10:00.000+0000", "created": "2011-06-23T01:37:01.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-06-19T12:46:31.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": [], "description": "I've created simple app in Titanium Studio that failed to run on emulator and device, see attached screenshots.\r\n\r\n{code}\r\n// Create test folder\r\nvar suitesDir = Titanium.Filesystem.getFile(Titanium.Filesystem.resourcesDirectory, 'testdata');\r\nif(!suitesDir.exists()) {\r\n\tsuitesDir.createDirectory();\r\n\talert('suites dir created');\r\n}\r\nvar testDir = Titanium.Filesystem.getFile(suitesDir.nativePath, 123);\r\n\r\nif(!testDir.exists()) {\r\n\ttestDir.createDirectory();\r\n\talert('test dir created');\r\n}\r\n\r\n// Delete everything from this dir\r\nvar file;\r\nvar files = testDir.getDirectoryListing();\r\nfor(var ii=files.length-1; ii>=0; ii--) {\r\n file = Titanium.Filesystem.getFile(testDir.nativePath, files[ii]);\r\n file.deleteFile();\r\n}\r\n\r\nvar testImplementation = 'alert(\"test\");';\r\n// Write implementation to the file\r\nvar newFile = Titanium.Filesystem.getFile(testDir.nativePath, 'test.js');\r\nif(newFile.write(testImplementation)) {\r\n alert('write ok');\r\n} else {\r\n alert('couldnt write file');\r\n}\r\n{code}", "attachment": [ { "id": "21438", "filename": "screen.PNG", "author": { "name": "ikucheinyk", "key": "ikucheinyk", "displayName": "Igor Kucheinyk", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-06-23T01:37:01.000+0000", "size": 89866, "mimeType": "image/png" }, { "id": "21437", "filename": "Screen shot 2011-06-23 at 10.38.52 AM.png", "author": { "name": "ikucheinyk", "key": "ikucheinyk", "displayName": "Igor Kucheinyk", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-06-23T01:37:01.000+0000", "size": 592094, "mimeType": "image/png" } ], "flagged": false, "summary": "Filesystem API does not work", "creator": { "name": "ikucheinyk", "key": "ikucheinyk", "displayName": "Igor Kucheinyk", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "ikucheinyk", "key": "ikucheinyk", "displayName": "Igor Kucheinyk", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "157668", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hello Igor,\nYou can't write to the resources directory. It's read-only. We'll discuss via email.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-06-23T11:10:00.000+0000", "updated": "2011-06-23T11:10:00.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }