cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clelland <...@git.apache.org>
Subject [GitHub] cordova-plugin-file pull request: Evo: Document the iosExtraFilesy...
Date Mon, 06 Oct 2014 20:35:03 GMT
Github user clelland commented on the pull request:

    https://github.com/apache/cordova-plugin-file/pull/82#issuecomment-58092692
  
    I don't think that recommending `window.requestFileSystem(3,...)` is the right way to
go here. Off the top of my head, I can think of two better ways to access these extra filesystem
roots:
    
    1. Use a `cdvfile://` URL:
    
        resolveLocalFileSystemURL("cdvfile://localhost/library-nosync/", function(entry) {
           // Successful, use entry
        }, function(err) {
           // Error, do something
        });
    
    2. Use the `cordova.file.*Directory` properties:
    
        resolveLocalFileSystemURL(cordova.file.dataDirectory, function(entry) {
           // Successful, use entry
        }, function(err) {
           // Error, do something
        });
    
    Both of these could be better-documented (one requires you to know how to construct a
cdvfile: URL; the other requires you to now that `dataDirectory` maps to Library-nosync).
I don't want to add instructions that tell people to hard code the magic constant `3`, which
is, as you say, likely to change if the config preference changes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Mime
View raw message