{ "id": "64018", "key": "TIMOB-3386", "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": "2017-05-02T21:47:14.000+0000", "created": "2011-04-15T03:43:38.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "parity" ], "versions": [], "issuelinks": [ { "id": "17296", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "65759", "key": "TIDOC-187", "fields": { "summary": "APIDoc: document second argument of Titanium.Filesystem.File.write() - boolean value to enable append mode", "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": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "17295", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "65758", "key": "DE-241", "fields": { "summary": "KitchenSink: Demonstrate the use of Titanium.Filesystem.MODE_* properties", "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": "Medium", "id": "3" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-05-02T21:47:14.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": "You cannot use MODE_APPEND to set the write mode to append when writing to a file, despite the properties listed in [Titanium.Filesystem|http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.Filesystem-module].\r\n\r\nMODE_APPEND is not demonstrated anywhere in the KitchenSink - have raised ticket TIMOB-4212 to address.\r\n\r\nIn Android only, you can pass a boolean to write() to use append mode, as in the example below, but this is not documented.\r\n\r\n{code:lang=javascript}\r\nvar newFile = Titanium.Filesystem.getFile(Titanium.Filesystem.applicationDataDirectory,'newfile.txt');\r\nnewFile.write('line 1\\n');\r\nnewFile.write('line 2\\n', true);\r\n\r\nTi.API.info('newfile: '+newFile.read());\r\n{code}\r\n\r\nTicket TIMOB-4213 has been raised to address this APIDoc issue.\r\n\r\nAssociated Helpdesk Ticket:\r\n[http://developer.appcelerator.com/helpdesk/view/76562]\r\n\r\nRemaining on this ticket:\r\n* determine whether the write() boolean argument and/or MODE_APPEND should work on each platforms, and test to ensure that they are in parity", "attachment": [], "flagged": false, "summary": "Android: Write to File in Append Mode", "creator": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Android 2.3.1, TiSDK 2.0.1GA2", "comment": { "comments": [ { "id": "418872", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Resolving ticket as Invalid as there is now a new version of Kitchen Sink available and we no longer support the version which relates to this ticket.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-05-02T21:47:14.000+0000", "updated": "2017-05-02T21:47:14.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }