[TIMOB-27458] Parity: Ti.Filesystem.getFile inconsistent in support of various URIs across platforms
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Release 8.2.0 |
Fix Version/s | n/a |
Components | iOS |
Labels | engSchedule |
Reporter | Christopher Williams |
Assignee | Unknown |
Created | 2019-10-09T14:54:15.000+0000 |
Updated | 2019-10-09T14:54:16.000+0000 |
Description
Between iOS and Android, we have very inconsistent support for various URIs we can pass in to refer to files. Some of this is expected, as Android has platform specific
content:
, appdata-private:
, android.resource:
, and file:///android_asset
schemes.
However, there's many differences in handling file:
URIs, app:
URIs, and paths with no scheme.
Specifically in calling Ti.Filesystem.getFile()
:
- iOS does not seem to support using app:
URIs. (A workaround would be to call Ti.App.appURLToPath()
on it first? Which is an undocumented public API!)
- Android doesn't support file://
or file:
URIs for relative paths and assumes/forces absolute
- iOS can't handle file:
URIs (no trailing double-slash on the scheme)
- Android assumes appdata-private:
scheme implicitly if not scheme is provided
See the test suite here: https://github.com/appcelerator/titanium_mobile/blob/6f176428755144db135986b281d08430fd036692/tests/Resources/ti.filesystem.file.addontest.js
No comments