[TIMOB-2951] iOS Feature Request: Add a byte() Method to Titanium.Filesystem
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Trivial |
Status | Closed |
Resolution | Won't Do |
Resolution Date | 2018-08-02T21:31:31.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | iOS |
Labels | n/a |
Reporter | Alan Leard |
Assignee | Eric Merriman |
Created | 2011-04-15T03:33:37.000+0000 |
Updated | 2018-08-02T21:31:36.000+0000 |
Description
User is trying to read a binary blob file. Specifically this users is trying to read the last 128 bytes from the data within the blob.
Ticket reference: http://developer.appcelerator.com/helpdesk/view/66511">http://developer.appcelerator.com/helpdesk/view/66511
Code he is attempting:
var ansi = Ti.Filesystem.getFile(Titanium.Filesystem.resourcesDirectory,'4THDS-05.DRK');
Ti.API.info('Native = ' + ansi.nativePath);
var content = ansi.read();
var sauce = content.getByte(content.size-128);
Ti.API.info('SAUCE = ' + sauce);</code>
Cleaning up old tickets. If this is still requested, please reopen.