{ "id": "89619", "key": "TIMOB-8580", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": "15115", "description": "2013 Sprint 10 BB", "name": "2013 Sprint 10 BB", "archived": true, "released": true, "releaseDate": "2013-05-20" }, { "id": "15108", "description": "2013 Sprint 10", "name": "2013 Sprint 10", "archived": true, "released": true, "releaseDate": "2013-05-20" }, { "id": "15479", "description": "Release 3.1.2", "name": "Release 3.1.2", "archived": true, "released": true, "releaseDate": "2013-07-31" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-05-17T22:30:00.000+0000", "created": "2012-04-06T06:35:46.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "module_filesystem", "notable", "qe-testadded" ], "versions": [], "issuelinks": [], "assignee": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2013-10-25T07:04:51.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": "10230", "name": "BlackBerry", "description": "BlackBerry Platform" } ], "description": "* Titanium.Filesystem\r\n* Titanium.Filesystem.applicationDataDirectory\r\n* Titanium.Filesystem.File\r\n* Titanium.Filesystem.File.append\r\n* Titanium.Filesystem.File.createDirectory\r\n* Titanium.Filesystem.File.deleteFile\r\n* Titanium.Filesystem.File.exists\r\n* Titanium.Filesystem.File.getNativePath\r\n* Titanium.Filesystem.File.nativePath\r\n* Titanium.Filesystem.File.read\r\n* Titanium.Filesystem.File.writable\r\n* Titanium.Filesystem.File.write\r\n* Titanium.Filesystem.getFile\r\n* Titanium.Filesystem.resourcesDirectory\r\n* Titanium.Filesystem.tempDirectory\r\n\r\n\r\nh3. Test code:\r\nReading a file from the Resources dir\r\n{code}\r\nTi.API.info('------------------------');\r\nTi.API.info('Testing resources directory reading app.js');\r\nvar app_js = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, 'app.js');\r\nvar blob = app_js.read();\r\nTi.API.info('---------');\r\nTi.API.info(blob.text);\r\n{code}\r\nCreating, writing, and reading a file from the data dir\r\n{code}\r\nTi.API.info('------------------------');\r\nTi.API.info('Testing data directory reading writing and reading');\r\nvar file = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, 'hello_world.txt');\r\nif(!file.exists()) {\r\n\tTi.API.info('file does not exist');\r\n\tfile.write('this is a test');\r\n\tTi.API.info('file exists? ' + file.exists());\r\n}\r\nTi.API.info('---------');\r\nvar blob = file.read();\r\nTi.API.info(blob.text);\r\n{code}\r\nGetting the directory listing from the data dir\r\n{code}\r\nTi.API.info('------------------------');\r\nTi.API.info('Testing data directory get listing');\r\nvar directory = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory);\r\nvar files = directory.getDirectoryListing();\r\nfor(var i = 0; i < files.length; i++) {\r\n\tTi.API.info('=====================');\r\n\tvar file = files[i];\r\n\tTi.API.info('filename: ' + file);\r\n\tvar _file = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, file);\r\n\tTi.API.info('isDirectory: ' + _file.isDirectory());\r\n\tTi.API.info('isFile: ' + _file.isFile());\r\n}\r\n{code}", "attachment": [], "flagged": false, "summary": "BlackBerry: Implement important Titanium.Filesystem functionality", "creator": { "name": "fboisvert", "key": "fboisvert", "displayName": "Francois Boisvert", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "fboisvert", "key": "fboisvert", "displayName": "Francois Boisvert", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "236751", "author": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Can we deliver all FS APIs in those 4 days? Otherwise I think we need to define what features this ticket will implement in this sprint.\nIt might be good to break up FS into two passes: 1. Querying file information / basic reading/writing (Ti.File). 2. File streams (Ti.FileStream).\n", "updateAuthor": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-01-31T18:30:13.000+0000", "updated": "2013-01-31T18:30:13.000+0000" }, { "id": "252659", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/titanium_mobile_blackberry/pull/39", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-05-17T21:45:42.000+0000", "updated": "2013-05-17T21:45:42.000+0000" }, { "id": "276744", "author": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix:\r\n\r\nTested Environment:\r\nAppcelerator Studio: 3.2.0.201310230601\r\nSDK:3.2.0.v20131024120843\r\nalloy: 1.2.2\r\nacs: 1.0.7\r\nnpm: 1.3.2\r\ntitanium: 3.2.0\r\ntitanium-code-processor: 1.0.3\r\nDevice:Blackberry Z10(v 10.0)\r\nOS: OSX 10.9\r\n\r\nUsed above specified code. Working fine.", "updateAuthor": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-10-25T07:04:31.000+0000", "updated": "2013-10-25T07:04:31.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }