[TIMOB-10711] iOS: read() method of filesystem not returning blob type for text file
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Low |
| Status | Closed |
| Resolution | Won't Fix |
| Resolution Date | 2017-07-26T23:45:36.000+0000 |
| Affected Version/s | Release 3.0.0, Release 3.1.0 |
| Fix Version/s | n/a |
| Components | iOS |
| Labels | api, qe-ios082012 |
| Reporter | Shyam Bhadauria |
| Assignee | Eric Merriman |
| Created | 2012-08-30T05:00:05.000+0000 |
| Updated | 2017-07-26T23:45:36.000+0000 |
Description
This is not a regression. It exists as far as 2.0.1.
This issue also occurs on android.
Steps to reproduce:
1) Use the code below and copy the attached text file in the resource directory.
var win = Ti.UI.createWindow({
backgroundColor: 'white'
});
win.open();
var f = Titanium.Filesystem.getFile(Titanium.Filesystem.resourcesDirectory, 'text.txt');
var contents = f.read();
Ti.API.info("contents blob object = "+ contents);
Ti.API.info('contents = ' + contents.text);
2. Notice the logs
Expected result:
Logs should display results like
[INFO] contents blob object = [object TiBlob]
[INFO] contents = Hello World. this is a filesystem read test.
Actual result:
Logs display
[INFO] contents blob object = Hello World. this is a filesystem read test.
[INFO] contents = Hello World. this is a filesystem read test.
Expected results are seen when image file is used instead of text file.
Attachments
| File | Date | Size |
|---|---|---|
| text.txt | 2012-08-30T05:07:53.000+0000 | 44 |
Issue reproduces Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 Titanium SDK version: 3.0.2 iOS iPhone Simulator: iOS SDK version: 6.0
Closing due to inactivity. If this issue still exists, please raise a new ticket.