{ "id": "84023", "key": "TIMOB-6741", "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": "12090", "description": "", "name": "Sprint 2011-50", "archived": true, "released": true, "releaseDate": "2011-12-19" }, { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" }, { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-01-30T16:54:22.000+0000", "created": "2011-12-17T15:38:58.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "parity", "verified-1.8.0.1" ], "versions": [ { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" } ], "issuelinks": [], "assignee": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-03-04T21:59:29.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": "{code}\r\nvar win = Titanium.UI.currentWindow;\r\nwin.backgroundColor = '#FFFFFF'\r\n\r\nvar close_button = Titanium.UI.createButton({\r\n title:'Close'\r\n});\r\n\r\nwin.leftNavButton = close_button;\r\n\r\nclose_button.addEventListener('click', function(e) {\r\n win.close();\r\n});\r\n\r\nvar file_path = '/media/test_video.mp4'; \r\n\r\nvar vf = Titanium.Filesystem.getFile(Titanium.Filesystem.resourcesDirectory, file_path);\r\n\r\nTi.API.info (\"[test_file_size.js] file: \" + file_path);\r\nTi.API.info (\"[test_file_size.js] bytes before read: \" + vf.size);\r\n\r\n\r\nvar video_data = vf.read();\r\n\r\nTi.API.info (\"[test_file_size.js] bytes after read: \" + vf.size);\r\nTi.API.info (\"[test_file_size.js] bytes in buffer: \" + video_data.size);\r\n{code}\r\n\r\nApparently {{vf.size}} is always 0. Naturally we will have to evaluate a different file. Test must go into drillbit.\r\n\r\nReport from this helpdesk ticket:\r\n\r\nhttp://support.appcelerator.com/tickets/APP-321287/tickets", "attachment": [], "flagged": false, "summary": "iOS: Ti.Filesystem.File.size does not work", "creator": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "176423", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Please run the new drillbit test in addition to manually verifying the size of a file when testing. Drillbit may be modified to include just such a test, but that would require an accurate byte dump to a file directly, which I can't remember how to do in UNIX right now.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-17T17:12:56.000+0000", "updated": "2011-12-17T17:12:56.000+0000" }, { "id": "176431", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "PR# 1043 fixes bug in Release 1.8.0.1", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-12-17T20:24:47.000+0000", "updated": "2011-12-17T20:24:47.000+0000" }, { "id": "176662", "author": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested on Ti Studio 1.0.7.201112152014\r\nTi Mob SDK 1.8.0.1.RC3\r\nOSX Lion\r\niPhone 4S OS 5.0.1\r\n\r\nVerified both manually and through drillbit (per Natalie) that the correct file size is output", "updateAuthor": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-19T18:25:08.000+0000", "updated": "2011-12-19T18:25:08.000+0000" }, { "id": "178993", "author": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing this issue as fixed against 1.8.0.1", "updateAuthor": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-11T16:28:47.000+0000", "updated": "2012-01-11T16:28:47.000+0000" }, { "id": "181138", "author": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopening/closing to add/remove labels", "updateAuthor": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-30T16:54:05.000+0000", "updated": "2012-01-30T16:54:05.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }