{ "id": "161007", "key": "TIMOB-23494", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "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": [ { "id": "17608", "name": "Release 6.1.0", "archived": false, "released": true, "releaseDate": "2017-05-26" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-10-31T14:52:10.000+0000", "created": "2016-06-10T18:59:11.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "parity" ], "versions": [], "issuelinks": [ { "id": "52000", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "outwardIssue": { "id": "161005", "key": "TIMOB-23493", "fields": { "summary": "Android: Support #append() method on Ti.Filesystem.File", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } }, { "id": "52001", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "155985", "key": "TIMOB-20624", "fields": { "summary": "Parity: Combine unit tests for SDKs into common suite/repo", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } } ], "assignee": { "name": "fmerzadyan", "key": "fmerzadyan2", "displayName": "Frankie Merzadyan", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2017-01-31T19:55:19.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "Android is the only platform that doesn't support Ti.Filesystem.File#createFile(). We should ideally support it for parity's sake.", "attachment": [], "flagged": false, "summary": "Android: Support #createFile() method on Ti.Filesystem.File", "creator": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "environment": null, "closedSprints": [ { "id": 741, "state": "closed", "name": "2016 Sprint 22 SDK", "startDate": "2016-10-22T00:02:29.945Z", "endDate": "2016-11-05T00:02:00.000Z", "completeDate": "2016-11-07T04:38:58.335Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "399058", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "PR here: https://github.com/appcelerator/titanium_mobile/pull/8514", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-10-17T02:39:55.000+0000", "updated": "2016-10-17T02:39:55.000+0000" }, { "id": "399321", "author": { "name": "fmerzadyan-OLD", "key": "fmerzadyan", "displayName": "Farzad Merzadyan", "active": false, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/8514", "updateAuthor": { "name": "fmerzadyan-OLD", "key": "fmerzadyan", "displayName": "Farzad Merzadyan", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-10-18T23:44:17.000+0000", "updated": "2016-10-18T23:44:17.000+0000" }, { "id": "405893", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the implementation.\r\n{{createFile()}} works as expected in android.\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tlayout:'vertical'\r\n});\r\n\r\nvar b1 = Ti.UI.createButton({\r\n\ttitle:\"tempdir\",\r\n\ttop:30\r\n});\r\n\r\nvar b2 = Ti.UI.createButton({\r\n\ttitle:\"appdatadir\",\r\n\ttop:20\r\n});\r\n\r\nvar b3 = Ti.UI.createButton({\r\n\ttitle:\"extstrdir\",\r\n\ttop:20\r\n});\r\n\r\nvar b4 = Ti.UI.createButton({\r\n\ttitle:\"appcachedir\",\r\n\ttop:20\r\n});\r\n\r\nfunction tempFile(){\r\n\tvar Settings = Titanium.Filesystem.getFile(Titanium.Filesystem.tempDirectory,'Settings');\r\n\tTi.API.info(\"Created Settings: \" + Settings.createDirectory());\r\n\tTi.API.info('Settings ' + Settings);\r\n\tvar newFile = Titanium.Filesystem.getFile(Settings.nativePath,'Settings.txt');\r\n\tnewFile.createFile();\r\n\t\r\n\tif (newFile.exists()){\r\n\t newFile.write('I am in temp dir.');\r\n\t alert('newfile: '+newFile.read());\r\n\t}\r\n}\r\n\r\nfunction appdatadir(){\r\n\tvar Settings = Titanium.Filesystem.getFile(Titanium.Filesystem.applicationDataDirectory,'Settings');\r\n\tTi.API.info(\"Created Settings: \" + Settings.createDirectory());\r\n\tTi.API.info('Settings ' + Settings);\r\n\tvar newFile = Titanium.Filesystem.getFile(Settings.nativePath,'Settings.txt');\r\n\t\r\n\tnewFile.createFile();\r\n\t\r\n\tif (newFile.exists()){\r\n\t newFile.write('I am in appl data dir.');\r\n\t alert('newfile: '+newFile.read());\r\n\t}\r\n}\r\n\r\nfunction extstrdir(){\r\n\tif(Ti.Filesystem.isExternalStoragePresent()){\r\n\tvar Settings = Titanium.Filesystem.getFile(Titanium.Filesystem.tempDirectory,'Settings');\r\n\t\tTi.API.info(\"Created Settings: \" + Settings.createDirectory());\r\n\t\tTi.API.info('Settings ' + Settings);\r\n\t\tvar newFile = Titanium.Filesystem.getFile(Settings.nativePath,'Settings.txt');\r\n\t\t\r\n\t\tnewFile.createFile();\r\n\t\t\r\n\t\tif (newFile.exists()){\r\n\t\t newFile.write('I am in ext str dir.');\r\n\t\t alert('newfile: '+newFile.read());\r\n\t\t}\r\n\t}\r\n\telse{\r\n\t\talert(\"No ext storage present\");\r\n\t}\r\n}\r\n\r\nfunction appcachedir(){\r\n\tvar Settings = Titanium.Filesystem.getFile(Titanium.Filesystem.tempDirectory,'Settings');\r\n\tTi.API.info(\"Created Settings: \" + Settings.createDirectory());\r\n\tTi.API.info('Settings ' + Settings);\r\n\tvar newFile = Titanium.Filesystem.getFile(Settings.nativePath,'Settings.txt');\r\n\t\r\n\tnewFile.createFile();\r\n\t\r\n\tif (newFile.exists()){\r\n\t newFile.write('I am in app cache dir.');\r\n\t alert('newfile: '+newFile.read());\r\n\t}\r\n}\r\n\r\nb1.addEventListener('click',function(){\r\n\ttempFile();\r\n});\r\n\r\nb2.addEventListener('click',function(){\r\n\tappdatadir();\r\n});\r\n\r\nb3.addEventListener('click',function(){\r\n\textstrdir();\r\n});\r\n\r\nb4.addEventListener('click',function(){\r\n\tappcachedir();\r\n});\r\n\r\nwin.add([b1,b2,b3,b4]);\r\nwin.open();\r\n{code}\r\n\r\nClosing.\r\n\r\nAppc Studio : 4.8.1.201612050850\r\nSDK Version : 6.1.0.v20170130073612\r\nMac OS Version : 10.12.2\r\nXcode Version : Xcode 8.2.1 Build version 8C1002\r\nAppc CLI AND Appc NPM : {\"NPM\":\"4.2.9-1\",\"CLI\":\"6.1.0\"}\r\nTi CLI : 5.0.11\r\nAlloy : 1.9.5\r\nNode : v4.6.0\r\nNexus 6 running 6.0.1, Android emulator 7.1.1, android emulator 4.4.2\r\n", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-01-31T19:54:44.000+0000", "updated": "2017-01-31T19:54:44.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }