[AC-2131] BlackBerry: Ti.Filesystem.getFile path is wrong
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2014-02-25T03:34:55.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Alloy, Titanium SDK & CLI |
Labels | blackberry |
Reporter | Hazem Khaled |
Assignee | Shak Hossain |
Created | 2014-02-13T11:11:46.000+0000 |
Updated | 2016-03-08T07:41:06.000+0000 |
Description
Hello,
You know default path on Titanium project is /Resources while we need to add the BB10 path before "app/native/assets/"
for example
if (OS_BLACKBERRY){
var url = 'app/native/assets/strings.xml';
} else {
var url = 'strings.xml';
}
var file = Ti.Filesystem.getFile(url);
Can we please make BlackBerry path like anyone else, or add this problem in documentation
Thanks a lot
Maybe we need to use something like that QDir::currentPath() + "/app/native/assets/" + (path of file)
Can you try
This should work in all platforms.
I'm already using this workaround Ti.Filesystem.getFile('app/native/assets/strings.xml'); and working fine, also your solution working fine Thanks
That is not a workaround, that is the proper way to do it.
Closing as invalid, thanks for reporting.