cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shazron Abdullah (JIRA)" <>
Subject [jira] [Commented] (CB-8032) Add nativeURL external method support for CDVFileSystem->makeEntryForPath:isDirectory:
Date Tue, 18 Nov 2014 16:48:34 GMT


Shazron Abdullah commented on CB-8032:

It's definitely not the best way to do this. Initially my goal was not to tightly couple it
with CDVFileSystem, but I think we may have to to avoid the "two webviews in an application"

I'm thinking of adding a delegate to CDVFileSystem -- not sure what to call it yet -- but
one of the methods in the delegate would be nativeURL:
The plugin can set this delegate by grabbing the current File plugin, enumerate all filesystems,
and the CDVFileSystem class can call it at the appropriate time.

> Add nativeURL external method support for CDVFileSystem->makeEntryForPath:isDirectory:
> --------------------------------------------------------------------------------------
>                 Key: CB-8032
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: Plugin File
>         Environment: iOS
>            Reporter: Shazron Abdullah
> Right now in CDVFileSystem->makeEntryForPath:isDirectory:, in the NSDictionary that
is returned, for the key "nativeURL" the format is fixed (file:// protocol for a local filesystem
reference, and assets-library:/ for a assets library filesystem reference.)
> When calculating the nativeURL, allow this to be specified externally, check for a selector
"nativeURL" and call that if available.
> This is for example declared in a Category in this plugin:
> ... which when linked will have the selector available for the File plugin to call.
> This code is part of the local webserver plugin - and it needs the File references to
be proxied through a local webserver.
> For example if the FileEntry is to:
>     file://my/package/folder/Documents/foo.txt
> .. the nativeURL would be, with this new category method, and the local webserver listening
to http://localhost:8080:
>     http://localhost:8080/local-filesystem/my/package/folder/Documents/foo.txt

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message