{ "id": "170823", "key": "TIMOB-25683", "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": [], "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2018-05-09T10:43:50.000+0000", "created": "2018-01-18T13:11:57.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [ { "id": "19988", "description": "", "name": "Release 7.0.1", "archived": false, "released": true, "releaseDate": "2017-12-21" } ], "issuelinks": [], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2018-08-06T17:41:11.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": "There are a couple of Ti.Filesystem.File API's that are not available on iOS according to the documentation:\r\n* copy(newPath)\r\n* readonly\r\n* parent\r\n\r\nAlso, some unit-tests are not working because:\r\n* createTimestamp() and modificationTimestamp() return a different value (Date) than they should (Number)\r\n* File-errors are muted, they should be logged on the error-level and the method should continue as before (no breaking change)\r\n* Return types are {{id}} instead of their proper type (TiBlob, TiFile, NSString, NSNumber). Not a biggie, but may look confusing to contributors \r\n\r\nWhile {{copy()}} was not available so far, the properties {{readonly}} and {{parent}} already but haven't been documented to be available.", "attachment": [], "flagged": false, "summary": "iOS: Address Ti.Filesystem parity issues, refactor Ti.Filesystem API's, fix broken tests", "creator": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "closedSprints": [ { "id": 1028, "state": "closed", "name": "2018 Sprint 09 SDK", "startDate": "2018-04-22T22:53:08.928Z", "endDate": "2018-05-06T22:53:00.000Z", "completeDate": "2018-05-07T00:02:15.883Z", "originBoardId": 114 }, { "id": 1018, "state": "closed", "name": "2018 Sprint 07 SDK", "startDate": "2018-03-25T21:59:36.637Z", "endDate": "2018-04-08T21:59:00.000Z", "completeDate": "2018-04-08T17:55:14.467Z", "originBoardId": 114 }, { "id": 1034, "state": "closed", "name": "2018 Sprint 10 SDK", "startDate": "2018-05-07T00:03:21.636Z", "endDate": "2018-05-21T00:03:00.000Z", "completeDate": "2018-05-20T20:54:58.928Z", "originBoardId": 114 }, { "id": 1021, "state": "closed", "name": "2018 Sprint 08 SDK", "startDate": "2018-04-08T17:57:36.122Z", "endDate": "2018-04-22T17:57:00.000Z", "completeDate": "2018-04-22T22:51:19.120Z", "originBoardId": 114 }, { "id": 1008, "state": "closed", "name": "2018 Sprint 06 SDK", "startDate": "2018-03-11T22:18:04.396Z", "endDate": "2018-03-25T22:18:00.000Z", "completeDate": "2018-03-25T21:52:36.683Z", "originBoardId": 216 } ], "comment": { "comments": [ { "id": "433303", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/9750\r\n\r\nTest-Case:\r\n{code:js}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: '#fff'\r\n});\r\n\r\nvar btn = Ti.UI.createButton({\r\n title: 'Trigger'\r\n});\r\n\r\nbtn.addEventListener('click', function() {\r\n \r\n // Hey there! Comment in the tests after each other and compare the results\r\n \r\n // testRecursiveDirectories();\r\n // testCreateTimestamp();\r\n // testModificationTimestamp();\r\n})\r\n\r\nfunction testRecursiveDirectories() {\r\n var dir = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, 'sub');\r\n \r\n Ti.API.info('Path: ' + dir.nativePath);\r\n \r\n // Should not exist\r\n if (dir.exists()) {\r\n Ti.API.error('#1 failed!');\r\n }\r\n \r\n // Should succeed\r\n if (!dir.createDirectory()) {\r\n Ti.API.error('#2 failed!');\r\n }\r\n \r\n // Should exist\r\n if (!dir.exists()) {\r\n Ti.API.error('#3 failed!');\r\n }\r\n \r\n // Should succeed\r\n if (!dir.deleteDirectory()) {\r\n Ti.API.error('#4 failed!');\r\n }\r\n \r\n // Should not exist\r\n if (dir.exists()) {\r\n Ti.API.error('#5 failed!');\r\n }\r\n}\r\n\r\nfunction testCreateTimestamp() {\r\n var file = Ti.Filesystem.getFile('app.js');\r\n var create_date = file.createTimestamp();\r\n \r\n // Should be a number (Double)\r\n Ti.API.info(create_date);\r\n}\r\n\r\nfunction testModificationTimestamp() {\r\n var file = Ti.Filesystem.getFile('app.js');\r\n var mod_date = file.modificationTimestamp();\r\n \r\n // Should be a number (Double)\r\n Ti.API.info(mod_date);\r\n}\r\n\r\nwin.add(btn);\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-01-18T16:27:12.000+0000", "updated": "2018-01-18T16:27:12.000+0000" }, { "id": "437507", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Resolved as part of TIMOB-26025", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-05-09T10:43:50.000+0000", "updated": "2018-05-09T10:43:50.000+0000" }, { "id": "440015", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing as a duplicate. If this is in error, please reopen.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-08-06T17:41:11.000+0000", "updated": "2018-08-06T17:41:11.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }