file.fullPath
is a part of the spec, and should actually look like: /path/relative/to/my/root
. If you're seeing that it has file:///
, then that's a bug.
file.nativeURL
is meant to be an implementation detail. But sadly, it's not obviously marked as such. It's not a part of the spec, and doesn't exist on other platforms.
file.toURL()
is likely what you want. It's a part of the spec, gives you a URL that can be passed to resolveLocalFileSystemURL
, and has fewer gotchas compared to cdvfile:
URLs.
file.toInternalURL()
is not a part of the spec, but it a Cordova-specific extension. I don't think it would ever be a useful thing to use.