{ "id": "64017", "key": "TIMOB-3385", "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": [ { "id": "11244", "name": "Release 1.7.0", "archived": true, "released": true, "releaseDate": "2011-06-13" }, { "id": "11255", "name": "Sprint 2011-20", "archived": true, "released": true, "releaseDate": "2011-05-23" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-05-24T13:39:31.000+0000", "created": "2011-04-15T03:43:38.000+0000", "priority": { "name": "Trivial", "id": "5" }, "labels": [ "defect", "ios", "reported-1.6.1", "rplist" ], "versions": [], "issuelinks": [], "assignee": { "name": "jacobrelkin", "key": "jacobrelkin", "displayName": "Jacob Relkin", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-05-24T13:39: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": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}

You cannot use MODE_APPEND to set the write mode to append when\nwriting to a file.
\nAPI docs say that Titanium.Filesystem.MODE_APPEND should be\nused.
\nNo way to write in append mode on iOS

\n

Tested With

\n

iOS 4.3, TiSDK 1.6.1

{html}", "attachment": [], "flagged": false, "summary": "iOS: 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": null, "comment": { "comments": [ { "id": "130949", "author": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This is how it works for Android\n{code:javascript}\nvar newFile = Titanium.Filesystem.getFile(Titanium.Filesystem.applicationDataDirectory,'newfile.txt');\nnewFile.write('line 1\\n');\nnewFile.write('line 2\\n', true); // 'true' puts write() in append mode\n\nTi.API.info('newfile: '+newFile.read());\n{code}", "updateAuthor": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-18T13:19:01.000+0000", "updated": "2011-04-18T13:19:01.000+0000" }, { "id": "130963", "author": { "name": "jacobrelkin", "key": "jacobrelkin", "displayName": "Jacob Relkin", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This functionality will be merged with the Stream implementation in the near future.\n\nRegardless, I have resolved this issue and it is pushed to master. (commit 44467a48a979c1285310a18b4729458503b8fdbe)", "updateAuthor": { "name": "jacobrelkin", "key": "jacobrelkin", "displayName": "Jacob Relkin", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-18T16:09:56.000+0000", "updated": "2011-04-18T16:09:56.000+0000" }, { "id": "133464", "author": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Please attach test media when checked in", "updateAuthor": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-05-11T16:40:58.000+0000", "updated": "2011-05-11T16:40:58.000+0000" }, { "id": "133627", "author": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "body": "As per Reggies last comment this issue is not fixed at this point.", "updateAuthor": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-05-15T13:55:11.000+0000", "updated": "2011-05-15T13:55:11.000+0000" }, { "id": "134165", "author": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with 1.7.0.86dae2c...\noptionalArgAPIs\ttrue\t10\tSuccess\nreadWriteText\ttrue\t31\tSuccess\nblobNativeFile\ttrue\t49\tSuccess\ndotSlash\ttrue\t59\tSuccess\nfileStreamBasicTest\ttrue\t108\tSuccess\nfileStreamWriteTest\ttrue\t132\tSuccess\nfileStreamAppendTest\ttrue\t171\tSuccess\nfileStreamPumpTest\ttrue\t200\tSuccess\nfileStreamWriteStreamTest\ttrue\t220\tSuccess\nfileStreamResourceFileTest\ttrue\t220\tSuccess\nfileStreamTruncateTest\ttrue\t262\tSuccess", "updateAuthor": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-05-24T13:39:31.000+0000", "updated": "2011-05-24T13:39:31.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }