mobox 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/README.md +89 -0
- data/Rakefile +2 -0
- data/bin/mobox +275 -0
- data/lib/mobox.rb +34 -0
- data/lib/mobox/config.rb +36 -0
- data/lib/mobox/helpers.rb +9 -0
- data/lib/mobox/render_scope.rb +9 -0
- data/lib/mobox/server.rb +91 -0
- data/lib/mobox/version.rb +3 -0
- data/mobox.gemspec +31 -0
- data/template/.mobox +2 -0
- data/template/Gemfile +3 -0
- data/template/config.ru +76 -0
- data/template/src/assets/images/mobox-logo-inkscape.svg +177 -0
- data/template/src/assets/images/mobox-logo.pdf +0 -0
- data/template/src/assets/images/mobox-logo.png +0 -0
- data/template/src/assets/images/mobox-logo.svg +120 -0
- data/template/src/assets/javascripts/app/config.js.coffee.erb +2 -0
- data/template/src/assets/javascripts/app/controllers/.gitignore +0 -0
- data/template/src/assets/javascripts/app/controllers/home.js.coffee +10 -0
- data/template/src/assets/javascripts/app/helpers/.gitignore +0 -0
- data/template/src/assets/javascripts/app/index.js.coffee +7 -0
- data/template/src/assets/javascripts/app/lib/.gitignore +0 -0
- data/template/src/assets/javascripts/app/lib/app.js.coffee +6 -0
- data/template/src/assets/javascripts/app/lib/config.js.coffee +3 -0
- data/template/src/assets/javascripts/app/lib/view.js.coffee +18 -0
- data/template/src/assets/javascripts/app/models/.gitignore +0 -0
- data/template/src/assets/javascripts/app/views/.gitignore +0 -0
- data/template/src/assets/javascripts/app/views/home/index.jst.hamljs +8 -0
- data/template/src/assets/javascripts/application.js.coffee +25 -0
- data/template/src/assets/javascripts/vendor/1140gs/css3-mediaqueries.js +779 -0
- data/template/src/assets/javascripts/vendor/cordova-2.0.0.js +5240 -0
- data/template/src/assets/javascripts/vendor/gfx/gfx.cube.js +161 -0
- data/template/src/assets/javascripts/vendor/gfx/gfx.effects.js +330 -0
- data/template/src/assets/javascripts/vendor/gfx/gfx.flip.js +52 -0
- data/template/src/assets/javascripts/vendor/gfx/gfx.js +93 -0
- data/template/src/assets/javascripts/vendor/gfx/gfx.overlay.js +81 -0
- data/template/src/assets/javascripts/vendor/gfx/index.js +5 -0
- data/template/src/assets/javascripts/vendor/hammer/.gitignore +1 -0
- data/template/src/assets/javascripts/vendor/hammer/LICENSE +19 -0
- data/template/src/assets/javascripts/vendor/hammer/hammer.js +741 -0
- data/template/src/assets/javascripts/vendor/hammer/index.coffee +2 -0
- data/template/src/assets/javascripts/vendor/hammer/jquery.hammer.js +26 -0
- data/template/src/assets/javascripts/vendor/hammer/jquery.specialevent.hammer.js +39 -0
- data/template/src/assets/javascripts/vendor/jquery.js +4 -0
- data/template/src/assets/javascripts/vendor/jquery_transit/index.coffee +1 -0
- data/template/src/assets/javascripts/vendor/jquery_transit/jquery.transit.js +658 -0
- data/template/src/assets/javascripts/vendor/spine/ajax.js +318 -0
- data/template/src/assets/javascripts/vendor/spine/list.js +74 -0
- data/template/src/assets/javascripts/vendor/spine/local.js +30 -0
- data/template/src/assets/javascripts/vendor/spine/manager.js +158 -0
- data/template/src/assets/javascripts/vendor/spine/panel.js +132 -0
- data/template/src/assets/javascripts/vendor/spine/relation.js +255 -0
- data/template/src/assets/javascripts/vendor/spine/route.js +220 -0
- data/template/src/assets/javascripts/vendor/spine/spine.js +913 -0
- data/template/src/assets/javascripts/vendor/spine/stage.js +146 -0
- data/template/src/assets/javascripts/vendor/spine/tabs.js +66 -0
- data/template/src/assets/javascripts/vendor/spine/tmpl.js +22 -0
- data/template/src/assets/javascripts/vendor/spine/touch.js +79 -0
- data/template/src/assets/stylesheets/application.css.sass +3 -0
- data/template/src/assets/stylesheets/base.sass +78 -0
- data/template/src/assets/stylesheets/vendor/1140gs/1140gs.sass +110 -0
- data/template/src/assets/stylesheets/vendor/1140gs/conditionals.sass +34 -0
- data/template/src/assets/stylesheets/vendor/1140gs/ie.css +43 -0
- data/template/src/assets/stylesheets/vendor/1140gs/index.sass +1 -0
- data/template/src/assets/stylesheets/vendor/spine_mobile/index.sass +1 -0
- data/template/src/assets/stylesheets/vendor/spine_mobile/mixin.sass +89 -0
- data/template/src/assets/stylesheets/vendor/spine_mobile/spine_mobile.sass +57 -0
- data/template/src/assets/stylesheets/vendor/spine_mobile/theme.sass +79 -0
- data/template/src/config.yml +2 -0
- data/template/src/index.haml +21 -0
- data/vendor/compass-sprockets/README.md +5 -0
- data/vendor/compass-sprockets/lib/compass-sprockets.rb +32 -0
- data/vendor/compass-sprockets/lib/compass/sprockets.rb +56 -0
- data/vendor/compass-sprockets/lib/compass/sprockets/version.rb +6 -0
- data/vendor/compass-sprockets/lib/sprockets/compressors.rb +96 -0
- data/vendor/compass-sprockets/lib/sprockets/static_compiler.rb +62 -0
- data/vendor/haml-sprockets/Gemfile +4 -0
- data/vendor/haml-sprockets/LICENSE +8 -0
- data/vendor/haml-sprockets/README.md +33 -0
- data/vendor/haml-sprockets/Rakefile +1 -0
- data/vendor/haml-sprockets/lib/haml-sprockets.rb +34 -0
- data/vendor/haml-sprockets/lib/haml-sprockets/engine.rb +7 -0
- data/vendor/haml-sprockets/lib/haml-sprockets/version.rb +5 -0
- data/vendor/haml-sprockets/spec/lib/haml-sprockets_spec.rb +43 -0
- data/vendor/haml-sprockets/spec/spec_helper.rb +2 -0
- data/vendor/haml-sprockets/vendor/assets/javascripts/haml.js +651 -0
- data/vendor/phonegap/.gitignore +19 -0
- data/vendor/phonegap/LICENSE +426 -0
- data/vendor/phonegap/README.md +49 -0
- data/vendor/phonegap/VERSION +1 -0
- data/vendor/phonegap/changelog +205 -0
- data/vendor/phonegap/doc/LICENSE +548 -0
- data/vendor/phonegap/doc/NOTICE +11 -0
- data/vendor/phonegap/doc/_index.html +355 -0
- data/vendor/phonegap/doc/_index.json +1 -0
- data/vendor/phonegap/doc/arrow.png +0 -0
- data/vendor/phonegap/doc/cordova_accelerometer_accelerometer.md.html +728 -0
- data/vendor/phonegap/doc/cordova_camera_camera.cleanup.md.html +159 -0
- data/vendor/phonegap/doc/cordova_camera_camera.md.html +670 -0
- data/vendor/phonegap/doc/cordova_compass_compass.md.html +707 -0
- data/vendor/phonegap/doc/cordova_connection_connection.md.html +355 -0
- data/vendor/phonegap/doc/cordova_contacts_contacts.md.html +1715 -0
- data/vendor/phonegap/doc/cordova_device_device.md.html +682 -0
- data/vendor/phonegap/doc/cordova_events_events.md.html +1538 -0
- data/vendor/phonegap/doc/cordova_file_file.md.html +2306 -0
- data/vendor/phonegap/doc/cordova_geolocation_geolocation.md.html +1002 -0
- data/vendor/phonegap/doc/cordova_media_capture_capture.md.html +1256 -0
- data/vendor/phonegap/doc/cordova_media_media.md.html +1745 -0
- data/vendor/phonegap/doc/cordova_notification_notification.md.html +691 -0
- data/vendor/phonegap/doc/cordova_storage_storage.md.html +988 -0
- data/vendor/phonegap/doc/guide_command-line_index.md.html +323 -0
- data/vendor/phonegap/doc/guide_cordova-webview_android.md.html +180 -0
- data/vendor/phonegap/doc/guide_cordova-webview_index.md.html +131 -0
- data/vendor/phonegap/doc/guide_cordova-webview_ios.md.html +275 -0
- data/vendor/phonegap/doc/guide_getting-started_android_index.md.html +291 -0
- data/vendor/phonegap/doc/guide_getting-started_bada_index.md.html +225 -0
- data/vendor/phonegap/doc/guide_getting-started_blackberry_index.md.html +267 -0
- data/vendor/phonegap/doc/guide_getting-started_index.md.html +132 -0
- data/vendor/phonegap/doc/guide_getting-started_ios_index.md.html +248 -0
- data/vendor/phonegap/doc/guide_getting-started_symbian_index.md.html +198 -0
- data/vendor/phonegap/doc/guide_getting-started_webos_index.md.html +200 -0
- data/vendor/phonegap/doc/guide_getting-started_windows-phone_index.md.html +228 -0
- data/vendor/phonegap/doc/guide_plugin-development_android_index.md.html +275 -0
- data/vendor/phonegap/doc/guide_plugin-development_bada_index.md.html +192 -0
- data/vendor/phonegap/doc/guide_plugin-development_blackberry_index.md.html +259 -0
- data/vendor/phonegap/doc/guide_plugin-development_index.md.html +230 -0
- data/vendor/phonegap/doc/guide_plugin-development_ios_index.md.html +282 -0
- data/vendor/phonegap/doc/guide_plugin-development_webos_index.md.html +125 -0
- data/vendor/phonegap/doc/guide_plugin-development_windows-phone_index.md.html +125 -0
- data/vendor/phonegap/doc/guide_upgrading_android_index.md.html +321 -0
- data/vendor/phonegap/doc/guide_upgrading_bada_index.md.html +165 -0
- data/vendor/phonegap/doc/guide_upgrading_blackberry_index.md.html +244 -0
- data/vendor/phonegap/doc/guide_upgrading_index.md.html +136 -0
- data/vendor/phonegap/doc/guide_upgrading_ios_index.md.html +547 -0
- data/vendor/phonegap/doc/guide_upgrading_symbian_index.md.html +123 -0
- data/vendor/phonegap/doc/guide_upgrading_webos_index.md.html +161 -0
- data/vendor/phonegap/doc/guide_upgrading_windows-phone_index.md.html +332 -0
- data/vendor/phonegap/doc/guide_whitelist_index.md.html +299 -0
- data/vendor/phonegap/doc/img/guide/getting-started/android/AndroidFlow.png +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/android/buildPath.jpg +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/android/javaSrc.jpg +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/android/manifest.jpg +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/android/manifest.png +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/android/new_android_project.jpeg +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/android/step_1.png +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/android/step_2.png +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/android/step_3.png +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/android/step_4.png +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/android/step_5.png +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/bada/bada_1_run.png +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/bada/bada_2_run.png +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/bada/bada_project.png +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/bada/bada_set_target.png +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/bada/import_bada_project.png +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/bada/import_bada_project_2.png +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/ios/HelloWorldiPhone4.png +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/ios/XCode4-templates.png +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/ios/bin_create_project.png +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/ios/bin_folder.png +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/ios/create-folder-reference.png +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/ios/index-not-found.png +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/ios/project.jpg +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/ios/www-folder.png +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/ios/xcode4-name_your_app.png +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/windows-phone/wp7projectstructure.PNG +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/windows-phone/wpd.png +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/windows-phone/wpfirstrun.PNG +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/windows-phone/wpnewproj.PNG +0 -0
- data/vendor/phonegap/doc/img/guide/getting-started/windows-phone/wprun.png +0 -0
- data/vendor/phonegap/doc/index.css +404 -0
- data/vendor/phonegap/doc/index.html +210 -0
- data/vendor/phonegap/doc/index.js +74 -0
- data/vendor/phonegap/doc/line.png +0 -0
- data/vendor/phonegap/doc/mobile.css +139 -0
- data/vendor/phonegap/doc/prettify/LICENSE +191 -0
- data/vendor/phonegap/doc/prettify/lang-apollo.js +2 -0
- data/vendor/phonegap/doc/prettify/lang-css.js +2 -0
- data/vendor/phonegap/doc/prettify/lang-hs.js +2 -0
- data/vendor/phonegap/doc/prettify/lang-lisp.js +2 -0
- data/vendor/phonegap/doc/prettify/lang-lua.js +2 -0
- data/vendor/phonegap/doc/prettify/lang-ml.js +2 -0
- data/vendor/phonegap/doc/prettify/lang-proto.js +1 -0
- data/vendor/phonegap/doc/prettify/lang-scala.js +2 -0
- data/vendor/phonegap/doc/prettify/lang-sql.js +2 -0
- data/vendor/phonegap/doc/prettify/lang-vb.js +2 -0
- data/vendor/phonegap/doc/prettify/lang-vhdl.js +3 -0
- data/vendor/phonegap/doc/prettify/lang-wiki.js +2 -0
- data/vendor/phonegap/doc/prettify/lang-yaml.js +2 -0
- data/vendor/phonegap/doc/prettify/prettify.css +44 -0
- data/vendor/phonegap/doc/prettify/prettify.js +33 -0
- data/vendor/phonegap/keys +201 -0
- data/vendor/phonegap/lib/DISCLAIMER +8 -0
- data/vendor/phonegap/lib/LICENSE +548 -0
- data/vendor/phonegap/lib/NOTICE +11 -0
- data/vendor/phonegap/lib/README.MD +54 -0
- data/vendor/phonegap/lib/android/LICENSE +202 -0
- data/vendor/phonegap/lib/android/NOTICE +5 -0
- data/vendor/phonegap/lib/android/README.md +114 -0
- data/vendor/phonegap/lib/android/VERSION +1 -0
- data/vendor/phonegap/lib/android/bin/create +147 -0
- data/vendor/phonegap/lib/android/bin/create.bat +15 -0
- data/vendor/phonegap/lib/android/bin/create.js +188 -0
- data/vendor/phonegap/lib/android/bin/create.xml +98 -0
- data/vendor/phonegap/lib/android/bin/package.json +22 -0
- data/vendor/phonegap/lib/android/bin/templates/cordova/ApplicationInfo/ApplicationInfo.class +0 -0
- data/vendor/phonegap/lib/android/bin/templates/cordova/ApplicationInfo/ApplicationInfo.java +44 -0
- data/vendor/phonegap/lib/android/bin/templates/cordova/BOOM +7 -0
- data/vendor/phonegap/lib/android/bin/templates/cordova/BOOM.bat +1 -0
- data/vendor/phonegap/lib/android/bin/templates/cordova/appinfo.jar +0 -0
- data/vendor/phonegap/lib/android/bin/templates/cordova/clean +7 -0
- data/vendor/phonegap/lib/android/bin/templates/cordova/clean.bat +1 -0
- data/vendor/phonegap/lib/android/bin/templates/cordova/cordova +85 -0
- data/vendor/phonegap/lib/android/bin/templates/cordova/cordova.bat +15 -0
- data/vendor/phonegap/lib/android/bin/templates/cordova/cordova.js +104 -0
- data/vendor/phonegap/lib/android/bin/templates/cordova/debug +7 -0
- data/vendor/phonegap/lib/android/bin/templates/cordova/debug.bat +1 -0
- data/vendor/phonegap/lib/android/bin/templates/cordova/emulate +7 -0
- data/vendor/phonegap/lib/android/bin/templates/cordova/emulate.bat +1 -0
- data/vendor/phonegap/lib/android/bin/templates/cordova/log +7 -0
- data/vendor/phonegap/lib/android/bin/templates/cordova/log.bat +1 -0
- data/vendor/phonegap/lib/android/bin/templates/project/Activity.java +35 -0
- data/vendor/phonegap/lib/android/bin/templates/project/AndroidManifest.xml +61 -0
- data/vendor/phonegap/lib/android/bin/templates/project/assets/www/index.html +60 -0
- data/vendor/phonegap/lib/android/bin/templates/project/assets/www/main.js +165 -0
- data/vendor/phonegap/lib/android/bin/templates/project/assets/www/master.css +116 -0
- data/vendor/phonegap/lib/android/bin/templates/project/res/drawable-hdpi/icon.png +0 -0
- data/vendor/phonegap/lib/android/bin/templates/project/res/drawable-ldpi/icon.png +0 -0
- data/vendor/phonegap/lib/android/bin/templates/project/res/drawable-mdpi/icon.png +0 -0
- data/vendor/phonegap/lib/android/bin/templates/project/res/drawable-xhdpi/icon.png +0 -0
- data/vendor/phonegap/lib/android/bin/templates/project/res/drawable/icon.png +0 -0
- data/vendor/phonegap/lib/android/bin/tests/test_create_unix.js +135 -0
- data/vendor/phonegap/lib/android/bin/tests/test_create_win.js +143 -0
- data/vendor/phonegap/lib/android/cordova-2.0.0.jar +0 -0
- data/vendor/phonegap/lib/android/cordova-2.0.0.js +5724 -0
- data/vendor/phonegap/lib/android/example/AndroidManifest.xml +61 -0
- data/vendor/phonegap/lib/android/example/ant.properties +17 -0
- data/vendor/phonegap/lib/android/example/assets/www/cordova-2.0.0.js +5724 -0
- data/vendor/phonegap/lib/android/example/assets/www/index.html +60 -0
- data/vendor/phonegap/lib/android/example/assets/www/main.js +165 -0
- data/vendor/phonegap/lib/android/example/assets/www/master.css +116 -0
- data/vendor/phonegap/lib/android/example/build.xml +83 -0
- data/vendor/phonegap/lib/android/example/cordova/BOOM +7 -0
- data/vendor/phonegap/lib/android/example/cordova/appinfo.jar +0 -0
- data/vendor/phonegap/lib/android/example/cordova/clean +7 -0
- data/vendor/phonegap/lib/android/example/cordova/cordova +85 -0
- data/vendor/phonegap/lib/android/example/cordova/debug +7 -0
- data/vendor/phonegap/lib/android/example/cordova/emulate +7 -0
- data/vendor/phonegap/lib/android/example/cordova/log +7 -0
- data/vendor/phonegap/lib/android/example/libs/cordova-2.0.0.jar +0 -0
- data/vendor/phonegap/lib/android/example/proguard-project.txt +20 -0
- data/vendor/phonegap/lib/android/example/project.properties +14 -0
- data/vendor/phonegap/lib/android/example/res/drawable-hdpi/ic_launcher.png +0 -0
- data/vendor/phonegap/lib/android/example/res/drawable-hdpi/icon.png +0 -0
- data/vendor/phonegap/lib/android/example/res/drawable-ldpi/ic_launcher.png +0 -0
- data/vendor/phonegap/lib/android/example/res/drawable-ldpi/icon.png +0 -0
- data/vendor/phonegap/lib/android/example/res/drawable-mdpi/ic_launcher.png +0 -0
- data/vendor/phonegap/lib/android/example/res/drawable-mdpi/icon.png +0 -0
- data/vendor/phonegap/lib/android/example/res/drawable-xhdpi/icon.png +0 -0
- data/vendor/phonegap/lib/android/example/res/drawable/icon.png +0 -0
- data/vendor/phonegap/lib/android/example/res/layout/main.xml +13 -0
- data/vendor/phonegap/lib/android/example/res/values/strings.xml +4 -0
- data/vendor/phonegap/lib/android/example/res/xml/config.xml +54 -0
- data/vendor/phonegap/lib/android/example/src/org/apache/cordova/example/cordovaExample.java +35 -0
- data/vendor/phonegap/lib/android/xml/config.xml +54 -0
- data/vendor/phonegap/lib/bada/Icons/Cordova.png +0 -0
- data/vendor/phonegap/lib/bada/Icons/Cordova_Splash.png +0 -0
- data/vendor/phonegap/lib/bada/LICENSE +202 -0
- data/vendor/phonegap/lib/bada/NOTICE +5 -0
- data/vendor/phonegap/lib/bada/README.md +48 -0
- data/vendor/phonegap/lib/bada/Res/cordova/accelerometer.js +131 -0
- data/vendor/phonegap/lib/bada/Res/cordova/camera.js +102 -0
- data/vendor/phonegap/lib/bada/Res/cordova/compass.js +77 -0
- data/vendor/phonegap/lib/bada/Res/cordova/contact.js +355 -0
- data/vendor/phonegap/lib/bada/Res/cordova/cordova.base.js +561 -0
- data/vendor/phonegap/lib/bada/Res/cordova/cordova.bat +21 -0
- data/vendor/phonegap/lib/bada/Res/cordova/cordova.js +1661 -0
- data/vendor/phonegap/lib/bada/Res/cordova/debugconsole.js +126 -0
- data/vendor/phonegap/lib/bada/Res/cordova/device.js +46 -0
- data/vendor/phonegap/lib/bada/Res/cordova/file.js +682 -0
- data/vendor/phonegap/lib/bada/Res/cordova/geolocation.js +152 -0
- data/vendor/phonegap/lib/bada/Res/cordova/network.js +70 -0
- data/vendor/phonegap/lib/bada/Res/cordova/notification.js +117 -0
- data/vendor/phonegap/lib/bada/Res/cordova/position.js +74 -0
- data/vendor/phonegap/lib/bada/Res/eng-GB.xml +26 -0
- data/vendor/phonegap/lib/bada/Res/images/cordova_logo_normal_dark.png +0 -0
- data/vendor/phonegap/lib/bada/Res/index.html +108 -0
- data/vendor/phonegap/lib/bada/Res/main.js +390 -0
- data/vendor/phonegap/lib/bada/VERSION +1 -0
- data/vendor/phonegap/lib/bada/application.xml +45 -0
- data/vendor/phonegap/lib/bada/inc/Accelerometer.h +54 -0
- data/vendor/phonegap/lib/bada/inc/Compass.h +52 -0
- data/vendor/phonegap/lib/bada/inc/Contacts.h +62 -0
- data/vendor/phonegap/lib/bada/inc/Cordova.h +82 -0
- data/vendor/phonegap/lib/bada/inc/CordovaCommand.h +46 -0
- data/vendor/phonegap/lib/bada/inc/DebugConsole.h +41 -0
- data/vendor/phonegap/lib/bada/inc/Device.h +43 -0
- data/vendor/phonegap/lib/bada/inc/GeoLocation.h +52 -0
- data/vendor/phonegap/lib/bada/inc/Kamera.h +49 -0
- data/vendor/phonegap/lib/bada/inc/Network.h +56 -0
- data/vendor/phonegap/lib/bada/inc/Notification.h +50 -0
- data/vendor/phonegap/lib/bada/inc/WebForm.h +97 -0
- data/vendor/phonegap/lib/bada/manifest.xml +61 -0
- data/vendor/phonegap/lib/bada/src/Accelerometer.cpp +135 -0
- data/vendor/phonegap/lib/bada/src/Compass.cpp +131 -0
- data/vendor/phonegap/lib/bada/src/Contacts.cpp +600 -0
- data/vendor/phonegap/lib/bada/src/Cordova.cpp +139 -0
- data/vendor/phonegap/lib/bada/src/CordovaCommand.cpp +33 -0
- data/vendor/phonegap/lib/bada/src/CordovaEntry.cpp +60 -0
- data/vendor/phonegap/lib/bada/src/DebugConsole.cpp +81 -0
- data/vendor/phonegap/lib/bada/src/Device.cpp +81 -0
- data/vendor/phonegap/lib/bada/src/GeoLocation.cpp +144 -0
- data/vendor/phonegap/lib/bada/src/Kamera.cpp +121 -0
- data/vendor/phonegap/lib/bada/src/Network.cpp +123 -0
- data/vendor/phonegap/lib/bada/src/Notification.cpp +176 -0
- data/vendor/phonegap/lib/bada/src/WebForm.cpp +231 -0
- data/vendor/phonegap/lib/badaWac/Icons/codova_bada_wac_splash_type4.png +0 -0
- data/vendor/phonegap/lib/badaWac/Icons/codova_bada_wac_splash_type5.png +0 -0
- data/vendor/phonegap/lib/badaWac/Icons/cordova_bada_icon_type5.png +0 -0
- data/vendor/phonegap/lib/badaWac/Icons/cordova_bada_wac_icon_type3.png +0 -0
- data/vendor/phonegap/lib/badaWac/Icons/cordova_bada_wac_icon_type4.png +0 -0
- data/vendor/phonegap/lib/badaWac/Icons/cordova_bada_wac_splash_type3.png +0 -0
- data/vendor/phonegap/lib/badaWac/LICENSE +201 -0
- data/vendor/phonegap/lib/badaWac/NOTICE +5 -0
- data/vendor/phonegap/lib/badaWac/README.md +12 -0
- data/vendor/phonegap/lib/badaWac/Res/config.xml +47 -0
- data/vendor/phonegap/lib/badaWac/Res/cordova-2.0.0.js +5676 -0
- data/vendor/phonegap/lib/badaWac/Res/css/index.css +100 -0
- data/vendor/phonegap/lib/badaWac/Res/img/cordova.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/index.html +24 -0
- data/vendor/phonegap/lib/badaWac/Res/js/index.js +15 -0
- data/vendor/phonegap/lib/badaWac/Res/res/icon/cordova_128.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/icon/cordova_16.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/icon/cordova_24.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/icon/cordova_256.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/icon/cordova_32.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/icon/cordova_48.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/icon/cordova_512.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/icon/cordova_64.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/icon/cordova_android_36.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/icon/cordova_android_48.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/icon/cordova_android_72.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/icon/cordova_android_96.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/icon/cordova_bb_80.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/icon/cordova_ios_114.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/icon/cordova_ios_144.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/icon/cordova_ios_57.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/icon/cordova_ios_72.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/screen/android_hdpi_landscape.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/screen/android_hdpi_portrait.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/screen/android_ldpi_landscape.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/screen/android_ldpi_portrait.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/screen/android_mdpi_landscape.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/screen/android_mdpi_portrait.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/screen/android_xhdpi_landscape.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/screen/android_xhdpi_portrait.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/screen/blackberry_transparent_300.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/screen/blackberry_transparent_400.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/screen/ipad_landscape.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/screen/ipad_portrait.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/screen/ipad_retina_landscape.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/screen/ipad_retina_portrait.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/screen/iphone_landscape.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/screen/iphone_portrait.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/screen/iphone_retina_landscape.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/screen/iphone_retina_portrait.png +0 -0
- data/vendor/phonegap/lib/badaWac/Res/res/screen/windows_phone_portrait.jpg +0 -0
- data/vendor/phonegap/lib/badaWac/Res/sample/index.html +167 -0
- data/vendor/phonegap/lib/badaWac/Res/sample/js/cordova.js +5576 -0
- data/vendor/phonegap/lib/badaWac/Res/sample/js/sample.js +404 -0
- data/vendor/phonegap/lib/badaWac/Res/spec.html +50 -0
- data/vendor/phonegap/lib/badaWac/Res/spec/helper.js +11 -0
- data/vendor/phonegap/lib/badaWac/Res/spec/index.js +49 -0
- data/vendor/phonegap/lib/badaWac/Res/spec/lib/jasmine-1.2.0/MIT.LICENSE +20 -0
- data/vendor/phonegap/lib/badaWac/Res/spec/lib/jasmine-1.2.0/jasmine-html.js +616 -0
- data/vendor/phonegap/lib/badaWac/Res/spec/lib/jasmine-1.2.0/jasmine.css +81 -0
- data/vendor/phonegap/lib/badaWac/Res/spec/lib/jasmine-1.2.0/jasmine.js +2529 -0
- data/vendor/phonegap/lib/badaWac/VERSION +1 -0
- data/vendor/phonegap/lib/badaWac/application.xml +51 -0
- data/vendor/phonegap/lib/badaWac/manifest.xml +58 -0
- data/vendor/phonegap/lib/blackberry/LICENSE +268 -0
- data/vendor/phonegap/lib/blackberry/NOTICE +8 -0
- data/vendor/phonegap/lib/blackberry/README.md +90 -0
- data/vendor/phonegap/lib/blackberry/VERSION +1 -0
- data/vendor/phonegap/lib/blackberry/bin/create +84 -0
- data/vendor/phonegap/lib/blackberry/bin/create.bat +14 -0
- data/vendor/phonegap/lib/blackberry/bin/create.js +94 -0
- data/vendor/phonegap/lib/blackberry/bin/templates/dist/README.md +90 -0
- data/vendor/phonegap/lib/blackberry/bin/templates/project/blackberry.xml +356 -0
- data/vendor/phonegap/lib/blackberry/bin/templates/project/build.xml +138 -0
- data/vendor/phonegap/lib/blackberry/bin/templates/project/cordova/debug +53 -0
- data/vendor/phonegap/lib/blackberry/bin/templates/project/cordova/emulate +40 -0
- data/vendor/phonegap/lib/blackberry/bin/templates/project/lib/ant-contrib/LICENSE.txt +47 -0
- data/vendor/phonegap/lib/blackberry/bin/templates/project/lib/ant-contrib/ant-contrib-1.0b3.jar +0 -0
- data/vendor/phonegap/lib/blackberry/bin/templates/project/playbook.xml +283 -0
- data/vendor/phonegap/lib/blackberry/bin/templates/project/project.properties +97 -0
- data/vendor/phonegap/lib/blackberry/bin/templates/project/www/config.xml +82 -0
- data/vendor/phonegap/lib/blackberry/bin/templates/project/www/index.html +976 -0
- data/vendor/phonegap/lib/blackberry/bin/templates/project/www/json2.js +482 -0
- data/vendor/phonegap/lib/blackberry/bin/templates/project/www/plugins.xml +34 -0
- data/vendor/phonegap/lib/blackberry/bin/templates/project/www/resources/icon.png +0 -0
- data/vendor/phonegap/lib/blackberry/bin/templates/project/www/resources/loading_foreground.png +0 -0
- data/vendor/phonegap/lib/blackberry/sample/blackberry.xml +356 -0
- data/vendor/phonegap/lib/blackberry/sample/build.xml +138 -0
- data/vendor/phonegap/lib/blackberry/sample/cordova/debug +53 -0
- data/vendor/phonegap/lib/blackberry/sample/cordova/emulate +40 -0
- data/vendor/phonegap/lib/blackberry/sample/lib/ant-contrib/LICENSE.txt +47 -0
- data/vendor/phonegap/lib/blackberry/sample/lib/ant-contrib/ant-contrib-1.0b3.jar +0 -0
- data/vendor/phonegap/lib/blackberry/sample/lib/cordova.2.0.0/ext-air/Cordova_Network/library.xml +40 -0
- data/vendor/phonegap/lib/blackberry/sample/lib/cordova.2.0.0/ext-air/Cordova_Network/src/org/apache/cordova/network/Network.as +80 -0
- data/vendor/phonegap/lib/blackberry/sample/lib/cordova.2.0.0/ext/cordova.2.0.0.jar +0 -0
- data/vendor/phonegap/lib/blackberry/sample/lib/cordova.2.0.0/javascript/cordova-2.0.0.js +6407 -0
- data/vendor/phonegap/lib/blackberry/sample/lib/cordova.2.0.0/javascript/playbook/cordova-2.0.0.js +6845 -0
- data/vendor/phonegap/lib/blackberry/sample/playbook.xml +283 -0
- data/vendor/phonegap/lib/blackberry/sample/project.properties +97 -0
- data/vendor/phonegap/lib/blackberry/sample/www/config.xml +82 -0
- data/vendor/phonegap/lib/blackberry/sample/www/cordova-2.0.0.js +6407 -0
- data/vendor/phonegap/lib/blackberry/sample/www/ext-air/Cordova_Network/library.xml +40 -0
- data/vendor/phonegap/lib/blackberry/sample/www/ext-air/Cordova_Network/src/org/apache/cordova/network/Network.as +80 -0
- data/vendor/phonegap/lib/blackberry/sample/www/ext/cordova.2.0.0.jar +0 -0
- data/vendor/phonegap/lib/blackberry/sample/www/index.html +976 -0
- data/vendor/phonegap/lib/blackberry/sample/www/json2.js +482 -0
- data/vendor/phonegap/lib/blackberry/sample/www/playbook/cordova-2.0.0.js +6845 -0
- data/vendor/phonegap/lib/blackberry/sample/www/plugins.xml +34 -0
- data/vendor/phonegap/lib/blackberry/sample/www/resources/icon.png +0 -0
- data/vendor/phonegap/lib/blackberry/sample/www/resources/loading_foreground.png +0 -0
- data/vendor/phonegap/lib/blackberry/www/config.xml +82 -0
- data/vendor/phonegap/lib/blackberry/www/cordova-2.0.0.js +6407 -0
- data/vendor/phonegap/lib/blackberry/www/ext-air/Cordova_Network/library.xml +40 -0
- data/vendor/phonegap/lib/blackberry/www/ext-air/Cordova_Network/src/org/apache/cordova/network/Network.as +80 -0
- data/vendor/phonegap/lib/blackberry/www/ext/cordova.2.0.0.jar +0 -0
- data/vendor/phonegap/lib/blackberry/www/playbook/cordova-2.0.0.js +6845 -0
- data/vendor/phonegap/lib/blackberry/www/plugins.xml +34 -0
- data/vendor/phonegap/lib/ios/Cordova-2.0.0.dmg +0 -0
- data/vendor/phonegap/lib/ios/Cordova-2.0.0.dmg.SHA1 +1 -0
- data/vendor/phonegap/lib/ios/LICENSE +394 -0
- data/vendor/phonegap/lib/ios/NOTICE +5 -0
- data/vendor/phonegap/lib/ios/bin/BOOM +27 -0
- data/vendor/phonegap/lib/ios/bin/README.md +29 -0
- data/vendor/phonegap/lib/ios/bin/_build.sh +92 -0
- data/vendor/phonegap/lib/ios/bin/autotest +24 -0
- data/vendor/phonegap/lib/ios/bin/bench +48 -0
- data/vendor/phonegap/lib/ios/bin/create +99 -0
- data/vendor/phonegap/lib/ios/bin/package.json +15 -0
- data/vendor/phonegap/lib/ios/bin/replaces +28 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__.xcodeproj/TemplateIcon.icns +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__.xcodeproj/TemplateInfo.plist +28 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__.xcodeproj/project.pbxproj +638 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/.gitignore +6 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Classes/AppDelegate.h +45 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Classes/AppDelegate.m +135 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Classes/MainViewController.h +32 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Classes/MainViewController.m +141 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Classes/MainViewController.xib +138 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Cordova.plist +83 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/CordovaBuildSettings.xcconfig +26 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Plugins/README +20 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/Capture.bundle/controls_bg.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/Capture.bundle/controls_bg@2x.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/Capture.bundle/controls_bg@2x~ipad.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/Capture.bundle/controls_bg~ipad.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/Capture.bundle/microphone.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/Capture.bundle/microphone@2x.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/Capture.bundle/microphone@2x~ipad.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/Capture.bundle/microphone~ipad.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/Capture.bundle/record_button.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/Capture.bundle/record_button@2x.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/Capture.bundle/record_button@2x~ipad.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/Capture.bundle/record_button~ipad.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/Capture.bundle/recording_bg.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/Capture.bundle/recording_bg@2x.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/Capture.bundle/recording_bg@2x~ipad.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/Capture.bundle/recording_bg~ipad.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/Capture.bundle/stop_button.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/Capture.bundle/stop_button@2x.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/Capture.bundle/stop_button@2x~ipad.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/Capture.bundle/stop_button~ipad.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/de.lproj/Localizable.strings +26 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/en.lproj/Localizable.strings +25 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/es.lproj/Localizable.strings +25 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/icons/icon-72.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/icons/icon-72@2x.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/icons/icon.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/icons/icon@2x.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/se.lproj/Localizable.strings +26 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/splash/Default-Landscape@2x~ipad.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/splash/Default-Landscape~ipad.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/splash/Default-Portrait@2x~ipad.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/splash/Default-Portrait~ipad.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/splash/Default@2x~iphone.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/Resources/splash/Default~iphone.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/__TESTING__-Info.plist +78 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/__TESTING__-Prefix.pch +26 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/__TESTING__/main.m +35 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/cordova/debug +47 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/cordova/emulate +58 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/cordova/log +26 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/config.xml +47 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/cordova-2.0.0.js +5240 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/css/index.css +100 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/img/cordova.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/index.html +44 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/js/index.js +20 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/icon/cordova_128.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/icon/cordova_16.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/icon/cordova_24.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/icon/cordova_256.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/icon/cordova_32.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/icon/cordova_48.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/icon/cordova_512.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/icon/cordova_64.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/icon/cordova_android_36.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/icon/cordova_android_48.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/icon/cordova_android_72.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/icon/cordova_android_96.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/icon/cordova_bb_80.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/icon/cordova_ios_114.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/icon/cordova_ios_144.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/icon/cordova_ios_57.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/icon/cordova_ios_72.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/screen/android_hdpi_landscape.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/screen/android_hdpi_portrait.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/screen/android_ldpi_landscape.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/screen/android_ldpi_portrait.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/screen/android_mdpi_landscape.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/screen/android_mdpi_portrait.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/screen/android_xhdpi_landscape.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/screen/android_xhdpi_portrait.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/screen/blackberry_transparent_300.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/screen/blackberry_transparent_400.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/screen/ipad_landscape.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/screen/ipad_portrait.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/screen/ipad_retina_landscape.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/screen/ipad_retina_portrait.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/screen/iphone_landscape.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/screen/iphone_portrait.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/screen/iphone_retina_landscape.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/screen/iphone_retina_portrait.png +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/res/screen/windows_phone_portrait.jpg +0 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/spec.html +50 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/spec/helper.js +11 -0
- data/vendor/phonegap/lib/ios/bin/templates/project/www/spec/index.js +49 -0
- data/vendor/phonegap/lib/ios/bin/test +44 -0
- data/vendor/phonegap/lib/ios/bin/tests/autotest.coffee +24 -0
- data/vendor/phonegap/lib/ios/bin/tests/create.coffee +34 -0
- data/vendor/phonegap/lib/ios/bin/tests/debug.coffee +18 -0
- data/vendor/phonegap/lib/ios/bin/tests/test.coffee +18 -0
- data/vendor/phonegap/lib/symbian/deprecated.txt +1 -0
- data/vendor/phonegap/lib/webos/LICENSE +202 -0
- data/vendor/phonegap/lib/webos/Makefile +127 -0
- data/vendor/phonegap/lib/webos/NOTICE +11 -0
- data/vendor/phonegap/lib/webos/README.md +52 -0
- data/vendor/phonegap/lib/webos/VERSION +1 -0
- data/vendor/phonegap/lib/webos/framework/appinfo.json +10 -0
- data/vendor/phonegap/lib/webos/framework/config.xml +47 -0
- data/vendor/phonegap/lib/webos/framework/cordova_48.png +0 -0
- data/vendor/phonegap/lib/webos/framework/css/index.css +100 -0
- data/vendor/phonegap/lib/webos/framework/img/cordova.png +0 -0
- data/vendor/phonegap/lib/webos/framework/index.html +24 -0
- data/vendor/phonegap/lib/webos/framework/js/index.js +20 -0
- data/vendor/phonegap/lib/webos/framework/res/icon/cordova_128.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/icon/cordova_16.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/icon/cordova_24.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/icon/cordova_256.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/icon/cordova_32.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/icon/cordova_48.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/icon/cordova_512.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/icon/cordova_64.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/icon/cordova_android_36.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/icon/cordova_android_48.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/icon/cordova_android_72.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/icon/cordova_android_96.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/icon/cordova_bb_80.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/icon/cordova_ios_114.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/icon/cordova_ios_144.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/icon/cordova_ios_57.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/icon/cordova_ios_72.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/screen/android_hdpi_landscape.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/screen/android_hdpi_portrait.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/screen/android_ldpi_landscape.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/screen/android_ldpi_portrait.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/screen/android_mdpi_landscape.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/screen/android_mdpi_portrait.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/screen/android_xhdpi_landscape.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/screen/android_xhdpi_portrait.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/screen/blackberry_transparent_300.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/screen/blackberry_transparent_400.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/screen/ipad_landscape.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/screen/ipad_portrait.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/screen/ipad_retina_landscape.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/screen/ipad_retina_portrait.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/screen/iphone_landscape.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/screen/iphone_portrait.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/screen/iphone_retina_landscape.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/screen/iphone_retina_portrait.png +0 -0
- data/vendor/phonegap/lib/webos/framework/res/screen/windows_phone_portrait.jpg +0 -0
- data/vendor/phonegap/lib/webos/framework/spec.html +50 -0
- data/vendor/phonegap/lib/webos/framework/spec/helper.js +11 -0
- data/vendor/phonegap/lib/webos/framework/spec/index.js +49 -0
- data/vendor/phonegap/lib/webos/framework/spec/lib/jasmine-1.2.0/MIT.LICENSE +20 -0
- data/vendor/phonegap/lib/webos/framework/spec/lib/jasmine-1.2.0/jasmine-html.js +616 -0
- data/vendor/phonegap/lib/webos/framework/spec/lib/jasmine-1.2.0/jasmine.css +81 -0
- data/vendor/phonegap/lib/webos/framework/spec/lib/jasmine-1.2.0/jasmine.js +2529 -0
- data/vendor/phonegap/lib/webos/js/acceleration.js +59 -0
- data/vendor/phonegap/lib/webos/js/accelerometer.js +133 -0
- data/vendor/phonegap/lib/webos/js/application.js +54 -0
- data/vendor/phonegap/lib/webos/js/audio.js +113 -0
- data/vendor/phonegap/lib/webos/js/camera.js +60 -0
- data/vendor/phonegap/lib/webos/js/compass.js +167 -0
- data/vendor/phonegap/lib/webos/js/contacts.js +69 -0
- data/vendor/phonegap/lib/webos/js/cordova-core.js +405 -0
- data/vendor/phonegap/lib/webos/js/debugconsole.js +62 -0
- data/vendor/phonegap/lib/webos/js/device.js +98 -0
- data/vendor/phonegap/lib/webos/js/file.js +79 -0
- data/vendor/phonegap/lib/webos/js/geolocation.js +232 -0
- data/vendor/phonegap/lib/webos/js/map.js +67 -0
- data/vendor/phonegap/lib/webos/js/mojo.js +81 -0
- data/vendor/phonegap/lib/webos/js/mouse.js +40 -0
- data/vendor/phonegap/lib/webos/js/network.js +96 -0
- data/vendor/phonegap/lib/webos/js/notification.js +139 -0
- data/vendor/phonegap/lib/webos/js/orientation.js +124 -0
- data/vendor/phonegap/lib/webos/js/position.js +87 -0
- data/vendor/phonegap/lib/webos/js/service.js +74 -0
- data/vendor/phonegap/lib/webos/js/sms.js +60 -0
- data/vendor/phonegap/lib/webos/js/telephony.js +45 -0
- data/vendor/phonegap/lib/webos/js/window.js +88 -0
- data/vendor/phonegap/lib/webos/js/windowproperties.js +31 -0
- data/vendor/phonegap/lib/webos/lib/thumbs.0.5.2.js +104 -0
- data/vendor/phonegap/lib/windows-phone/LICENSE +12 -0
- data/vendor/phonegap/lib/windows-phone/NOTICE +5 -0
- data/vendor/phonegap/lib/windows-phone/README.md +50 -0
- data/vendor/phonegap/lib/windows-phone/VERSION +1 -0
- data/vendor/phonegap/lib/windows-phone/bin/create.bat +1 -0
- data/vendor/phonegap/lib/windows-phone/bin/create.js +154 -0
- data/vendor/phonegap/lib/windows-phone/example/App.xaml +37 -0
- data/vendor/phonegap/lib/windows-phone/example/App.xaml.cs +154 -0
- data/vendor/phonegap/lib/windows-phone/example/ApplicationIcon.png +0 -0
- data/vendor/phonegap/lib/windows-phone/example/Background.png +0 -0
- data/vendor/phonegap/lib/windows-phone/example/BuildManifestProcessor.js +81 -0
- data/vendor/phonegap/lib/windows-phone/example/CordovaExample.csproj +195 -0
- data/vendor/phonegap/lib/windows-phone/example/CordovaExample.sln +28 -0
- data/vendor/phonegap/lib/windows-phone/example/CordovaSourceDictionary.xml +4 -0
- data/vendor/phonegap/lib/windows-phone/example/MainPage.xaml +52 -0
- data/vendor/phonegap/lib/windows-phone/example/MainPage.xaml.cs +70 -0
- data/vendor/phonegap/lib/windows-phone/example/Plugins/Calculator.cs +46 -0
- data/vendor/phonegap/lib/windows-phone/example/Properties/AppManifest.xml +24 -0
- data/vendor/phonegap/lib/windows-phone/example/Properties/AssemblyInfo.cs +38 -0
- data/vendor/phonegap/lib/windows-phone/example/Properties/WMAppManifest.xml +59 -0
- data/vendor/phonegap/lib/windows-phone/example/SplashScreenImage.jpg +0 -0
- data/vendor/phonegap/lib/windows-phone/example/www/accelerometer.html +164 -0
- data/vendor/phonegap/lib/windows-phone/example/www/accelerometer2.html +175 -0
- data/vendor/phonegap/lib/windows-phone/example/www/audio.html +267 -0
- data/vendor/phonegap/lib/windows-phone/example/www/calculator.html +84 -0
- data/vendor/phonegap/lib/windows-phone/example/www/camera.html +115 -0
- data/vendor/phonegap/lib/windows-phone/example/www/capture.html +207 -0
- data/vendor/phonegap/lib/windows-phone/example/www/compass.html +150 -0
- data/vendor/phonegap/lib/windows-phone/example/www/contacts.html +169 -0
- data/vendor/phonegap/lib/windows-phone/example/www/cordova-2.0.0.js +5658 -0
- data/vendor/phonegap/lib/windows-phone/example/www/events.html +146 -0
- data/vendor/phonegap/lib/windows-phone/example/www/file.html +284 -0
- data/vendor/phonegap/lib/windows-phone/example/www/index.html +108 -0
- data/vendor/phonegap/lib/windows-phone/example/www/location.html +165 -0
- data/vendor/phonegap/lib/windows-phone/example/www/master.css +156 -0
- data/vendor/phonegap/lib/windows-phone/example/www/network.html +96 -0
- data/vendor/phonegap/lib/windows-phone/example/www/notification.html +112 -0
- data/vendor/phonegap/lib/windows-phone/example/www/storage.html +78 -0
- data/vendor/phonegap/lib/windows-phone/framework/Images/appbar.back.rest.png +0 -0
- data/vendor/phonegap/lib/windows-phone/framework/Images/appbar.close.rest.png +0 -0
- data/vendor/phonegap/lib/windows-phone/framework/Images/appbar.feature.video.rest.png +0 -0
- data/vendor/phonegap/lib/windows-phone/framework/Images/appbar.next.rest.png +0 -0
- data/vendor/phonegap/lib/windows-phone/framework/Images/appbar.save.rest.png +0 -0
- data/vendor/phonegap/lib/windows-phone/framework/Images/appbar.stop.rest.png +0 -0
- data/vendor/phonegap/lib/windows-phone/framework/Properties/AssemblyInfo.cs +35 -0
- data/vendor/phonegap/lib/windows-phone/framework/WP7CordovaClassLib.csproj +281 -0
- data/vendor/phonegap/lib/windows-phone/framework/WP7CordovaClassLib.sln +20 -0
- data/vendor/phonegap/lib/windows-phone/framework/WP7CordovaClassLibBare.csproj +127 -0
- data/vendor/phonegap/lib/windows-phone/framework/WP7GapClassLibBare.sln +20 -0
- data/vendor/phonegap/lib/windows-phone/framework/resources/notification-beep.wav +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/CordovaStarter-2.0.0.zip +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/custom/App.xaml +37 -0
- data/vendor/phonegap/lib/windows-phone/templates/custom/App.xaml.cs +154 -0
- data/vendor/phonegap/lib/windows-phone/templates/custom/ApplicationIcon.png +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/custom/Background.png +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/custom/BuildManifestProcessor.js +83 -0
- data/vendor/phonegap/lib/windows-phone/templates/custom/CordovaAppProj.csproj +152 -0
- data/vendor/phonegap/lib/windows-phone/templates/custom/CordovaSolution.sln +22 -0
- data/vendor/phonegap/lib/windows-phone/templates/custom/CordovaSourceDictionary.xml +23 -0
- data/vendor/phonegap/lib/windows-phone/templates/custom/MainPage.xaml +52 -0
- data/vendor/phonegap/lib/windows-phone/templates/custom/MainPage.xaml.cs +72 -0
- data/vendor/phonegap/lib/windows-phone/templates/custom/Properties/AppManifest.xml +6 -0
- data/vendor/phonegap/lib/windows-phone/templates/custom/Properties/AssemblyInfo.cs +38 -0
- data/vendor/phonegap/lib/windows-phone/templates/custom/Properties/WMAppManifest.xml +32 -0
- data/vendor/phonegap/lib/windows-phone/templates/custom/SplashScreenImage.jpg +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/custom/VERSION +1 -0
- data/vendor/phonegap/lib/windows-phone/templates/custom/www/cordova-2.0.0.js +5672 -0
- data/vendor/phonegap/lib/windows-phone/templates/custom/www/css/index.css +100 -0
- data/vendor/phonegap/lib/windows-phone/templates/custom/www/img/cordova.png +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/custom/www/index.html +24 -0
- data/vendor/phonegap/lib/windows-phone/templates/custom/www/js/index.js +20 -0
- data/vendor/phonegap/lib/windows-phone/templates/description.txt +4 -0
- data/vendor/phonegap/lib/windows-phone/templates/full/App.xaml +37 -0
- data/vendor/phonegap/lib/windows-phone/templates/full/App.xaml.cs +154 -0
- data/vendor/phonegap/lib/windows-phone/templates/full/ApplicationIcon.png +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/full/Background.png +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/full/BuildManifestProcessor.js +80 -0
- data/vendor/phonegap/lib/windows-phone/templates/full/CordovaAppProj.csproj +153 -0
- data/vendor/phonegap/lib/windows-phone/templates/full/CordovaLib/WP7CordovaClassLib.dll +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/full/CordovaSolution.sln +22 -0
- data/vendor/phonegap/lib/windows-phone/templates/full/CordovaSourceDictionary.xml +9 -0
- data/vendor/phonegap/lib/windows-phone/templates/full/MainPage.xaml +52 -0
- data/vendor/phonegap/lib/windows-phone/templates/full/MainPage.xaml.cs +72 -0
- data/vendor/phonegap/lib/windows-phone/templates/full/Properties/AppManifest.xml +6 -0
- data/vendor/phonegap/lib/windows-phone/templates/full/Properties/AssemblyInfo.cs +38 -0
- data/vendor/phonegap/lib/windows-phone/templates/full/Properties/WMAppManifest.xml +41 -0
- data/vendor/phonegap/lib/windows-phone/templates/full/SplashScreenImage.jpg +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/full/VERSION +1 -0
- data/vendor/phonegap/lib/windows-phone/templates/full/cordova/debug.bat +68 -0
- data/vendor/phonegap/lib/windows-phone/templates/full/cordova/emulate.bat +24 -0
- data/vendor/phonegap/lib/windows-phone/templates/full/www/cordova-2.0.0.js +5672 -0
- data/vendor/phonegap/lib/windows-phone/templates/full/www/css/index.css +100 -0
- data/vendor/phonegap/lib/windows-phone/templates/full/www/img/cordova.png +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/full/www/index.html +24 -0
- data/vendor/phonegap/lib/windows-phone/templates/full/www/js/index.js +20 -0
- data/vendor/phonegap/lib/windows-phone/templates/pg_templateIcon.png +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/pg_templatePreview.jpg +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/App.xaml +37 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/App.xaml.cs +154 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/ApplicationIcon.png +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/Background.png +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/BuildManifestProcessor.js +80 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/CordovaAppProj.csproj +231 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/CordovaSolution.sln +22 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/CordovaSourceDictionary.xml +4 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/MainPage.xaml +52 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/MainPage.xaml.cs +72 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/Properties/AppManifest.xml +6 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/Properties/AssemblyInfo.cs +38 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/Properties/WMAppManifest.xml +42 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/SplashScreenImage.jpg +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/VERSION +1 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordova/debug.bat +68 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordova/emulate.bat +24 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/BrowserMouseHelper.cs +345 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/CommandFactory.cs +104 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Commands/Accelerometer.cs +195 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Commands/AudioPlayer.cs +617 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Commands/BaseCommand.cs +129 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Commands/Battery.cs +79 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Commands/Camera.cs +490 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Commands/Capture.cs +735 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Commands/Compass.cs +364 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Commands/Contacts.cs +643 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Commands/DebugConsole.cs +49 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Commands/Device.cs +124 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Commands/File.cs +1441 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Commands/FileTransfer.cs +525 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Commands/GeoLocation.cs +34 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Commands/ImageExifHelper.cs +222 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Commands/Media.cs +522 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Commands/MimeTypeMapper.cs +99 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Commands/NetworkStatus.cs +124 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Commands/Notification.cs +322 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/CordovaCommandCall.cs +86 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/CordovaView.xaml +65 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/CordovaView.xaml.cs +451 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/DOMStorageHelper.cs +145 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Images/appbar.back.rest.png +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Images/appbar.close.rest.png +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Images/appbar.feature.video.rest.png +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Images/appbar.next.rest.png +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Images/appbar.save.rest.png +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/Images/appbar.stop.rest.png +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/JSON/JsonHelper.cs +97 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/NativeExecution.cs +207 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/OrientationHelper.cs +128 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/PluginResult.cs +165 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/ScriptCallback.cs +80 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/UI/AudioCaptureTask.cs +105 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/UI/AudioRecorder.xaml +66 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/UI/AudioRecorder.xaml.cs +387 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/UI/ImageCapture.xaml +26 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/UI/ImageCapture.xaml.cs +107 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/UI/NotificationBox.xaml +62 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/UI/NotificationBox.xaml.cs +41 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/UI/VideoCaptureTask.cs +104 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/UI/VideoRecorder.xaml +52 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/UI/VideoRecorder.xaml.cs +405 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/cordovalib/resources/notification-beep.wav +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/www/cordova-2.0.0.js +5672 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/www/css/index.css +100 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/www/img/cordova.png +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/www/index.html +24 -0
- data/vendor/phonegap/lib/windows-phone/templates/standalone/www/js/index.js +20 -0
- data/vendor/phonegap/lib/windows-phone/templates/vspackage/GapAppVsPackage.cs +64 -0
- data/vendor/phonegap/lib/windows-phone/templates/vspackage/GapAppVsPackage.csproj +174 -0
- data/vendor/phonegap/lib/windows-phone/templates/vspackage/GlobalSuppressions.cs +11 -0
- data/vendor/phonegap/lib/windows-phone/templates/vspackage/Guids.cs +14 -0
- data/vendor/phonegap/lib/windows-phone/templates/vspackage/Key.snk +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/vspackage/Properties/AssemblyInfo.cs +36 -0
- data/vendor/phonegap/lib/windows-phone/templates/vspackage/Resources.Designer.cs +63 -0
- data/vendor/phonegap/lib/windows-phone/templates/vspackage/Resources.resx +129 -0
- data/vendor/phonegap/lib/windows-phone/templates/vspackage/Resources/Package.ico +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/vspackage/VSPackage.resx +140 -0
- data/vendor/phonegap/lib/windows-phone/templates/vspackage/pg_templateIcon.png +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/vspackage/pg_templatePreview.jpg +0 -0
- data/vendor/phonegap/lib/windows-phone/templates/vspackage/source.extension.vsixmanifest +30 -0
- data/vendor/phonegap/lib/windows-phone/tests/MobileSpecUnitTests/App.xaml +38 -0
- data/vendor/phonegap/lib/windows-phone/tests/MobileSpecUnitTests/App.xaml.cs +158 -0
- data/vendor/phonegap/lib/windows-phone/tests/MobileSpecUnitTests/ApplicationIcon.png +0 -0
- data/vendor/phonegap/lib/windows-phone/tests/MobileSpecUnitTests/Background.png +0 -0
- data/vendor/phonegap/lib/windows-phone/tests/MobileSpecUnitTests/BuildManifestProcessor.js +80 -0
- data/vendor/phonegap/lib/windows-phone/tests/MobileSpecUnitTests/CordovaSourceDictionary.xml +4 -0
- data/vendor/phonegap/lib/windows-phone/tests/MobileSpecUnitTests/MainPage.xaml +52 -0
- data/vendor/phonegap/lib/windows-phone/tests/MobileSpecUnitTests/MainPage.xaml.cs +42 -0
- data/vendor/phonegap/lib/windows-phone/tests/MobileSpecUnitTests/MobileSpecUnitTests.csproj +141 -0
- data/vendor/phonegap/lib/windows-phone/tests/MobileSpecUnitTests/MobileSpecUnitTests.sln +28 -0
- data/vendor/phonegap/lib/windows-phone/tests/MobileSpecUnitTests/Properties/AppManifest.xml +6 -0
- data/vendor/phonegap/lib/windows-phone/tests/MobileSpecUnitTests/Properties/AssemblyInfo.cs +35 -0
- data/vendor/phonegap/lib/windows-phone/tests/MobileSpecUnitTests/Properties/WMAppManifest.xml +35 -0
- data/vendor/phonegap/lib/windows-phone/tests/MobileSpecUnitTests/SplashScreenImage.jpg +0 -0
- data/vendor/phonegap/lib/windows-phone/tests/MobileSpecUnitTests/www/cordova-2.0.0.js +5658 -0
- data/vendor/phonegap/lib/windows-phone/tests/MobileSpecUnitTests/www/index.html +43 -0
- data/vendor/phonegap/lib/windows-phone/tests/MobileSpecUnitTests/www/master.css +112 -0
- data/vendor/phonegap/lib/windows-phone/tooling/CordovaDeploy/CordovaDeploy.sln +20 -0
- data/vendor/phonegap/lib/windows-phone/tooling/CordovaDeploy/CordovaDeploy/CordovaDeploy.csproj +79 -0
- data/vendor/phonegap/lib/windows-phone/tooling/CordovaDeploy/CordovaDeploy/Program.cs +219 -0
- data/vendor/phonegap/lib/windows-phone/tooling/CordovaDeploy/CordovaDeploy/Properties/AssemblyInfo.cs +36 -0
- data/vendor/phonegap/lib/windows-phone/tooling/scripts/debug.bat +68 -0
- data/vendor/phonegap/lib/windows-phone/tooling/scripts/emulate.bat +24 -0
- metadata +1040 -0
@@ -0,0 +1,2306 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<!--
|
3
|
+
Licensed to the Apache Software Foundation (ASF) under one
|
4
|
+
or more contributor license agreements. See the NOTICE file
|
5
|
+
distributed with this work for additional information
|
6
|
+
regarding copyright ownership. The ASF licenses this file
|
7
|
+
to you under the Apache License, Version 2.0 (the
|
8
|
+
"License"); you may not use this file except in compliance
|
9
|
+
with the License. You may obtain a copy of the License at
|
10
|
+
|
11
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
|
13
|
+
Unless required by applicable law or agreed to in writing,
|
14
|
+
software distributed under the License is distributed on an
|
15
|
+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
16
|
+
KIND, either express or implied. See the License for the
|
17
|
+
specific language governing permissions and limitations
|
18
|
+
under the License.
|
19
|
+
--><html lang="en">
|
20
|
+
<head>
|
21
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
22
|
+
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, width=device-width">
|
23
|
+
<meta name="generator" content="joDoc">
|
24
|
+
<title>Apache Cordova API Documentation</title>
|
25
|
+
<link rel="stylesheet" type="text/css" href="index.css">
|
26
|
+
<link rel="stylesheet" type="text/css" href="mobile.css" media="only screen and (max-device-width: 1024px)">
|
27
|
+
<link rel="stylesheet" type="text/css" href="prettify/prettify.css">
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div id="header">
|
31
|
+
<h1><a href="index.html">Apache <strong>Cordova</strong> Documentation</a></h1>
|
32
|
+
<small>
|
33
|
+
<select><optgroup label="English" value="en">
|
34
|
+
<option value="edge">edge</option>
|
35
|
+
<option value="2.0.0rc1">2.0.0rc1</option>
|
36
|
+
<option selected value="2.0.0">2.0.0</option>
|
37
|
+
<option value="1.9.0rc1">1.9.0rc1</option>
|
38
|
+
<option value="1.9.0">1.9.0</option>
|
39
|
+
<option value="1.8.1">1.8.1</option>
|
40
|
+
<option value="1.8.0rc1">1.8.0rc1</option>
|
41
|
+
<option value="1.8.0">1.8.0</option>
|
42
|
+
<option value="1.7.0rc1">1.7.0rc1</option>
|
43
|
+
<option value="1.7.0">1.7.0</option>
|
44
|
+
<option value="1.6.1">1.6.1</option>
|
45
|
+
<option value="1.6.0rc1">1.6.0rc1</option>
|
46
|
+
<option value="1.6.0">1.6.0</option>
|
47
|
+
<option value="1.5.0rc1">1.5.0rc1</option>
|
48
|
+
<option value="1.5.0">1.5.0</option>
|
49
|
+
<option value="1.4.1">1.4.1</option>
|
50
|
+
<option value="1.4.0rc1">1.4.0rc1</option>
|
51
|
+
<option value="1.4.0">1.4.0</option>
|
52
|
+
<option value="1.3.0">1.3.0</option>
|
53
|
+
<option value="1.2.0">1.2.0</option>
|
54
|
+
<option value="1.1.0">1.1.0</option>
|
55
|
+
<option value="1.0.0rc3">1.0.0rc3</option>
|
56
|
+
<option value="1.0.0rc2">1.0.0rc2</option>
|
57
|
+
<option value="1.0.0rc1">1.0.0rc1</option>
|
58
|
+
<option value="1.0.0">1.0.0</option>
|
59
|
+
<option value="0.9.6">0.9.6</option>
|
60
|
+
<option value="0.9.5.1">0.9.5.1</option>
|
61
|
+
<option value="0.9.5">0.9.5</option>
|
62
|
+
<option value="0.9.4">0.9.4</option>
|
63
|
+
<option value="0.9.3">0.9.3</option>
|
64
|
+
<option value="0.9.2">0.9.2</option>
|
65
|
+
</optgroup>
|
66
|
+
<optgroup label="Español" value="es"><option value="1.0.0">1.0.0</option></optgroup>
|
67
|
+
<optgroup label="Français" value="fr">
|
68
|
+
<option value="1.3.0">1.3.0</option>
|
69
|
+
<option value="1.2.0">1.2.0</option>
|
70
|
+
<option value="1.1.0">1.1.0</option>
|
71
|
+
</optgroup>
|
72
|
+
<optgroup label="Japanese" value="jp">
|
73
|
+
<option value="1.8.1">1.8.1</option>
|
74
|
+
<option value="1.7.0">1.7.0</option>
|
75
|
+
<option value="0.9.5">0.9.5</option>
|
76
|
+
</optgroup></select></small>
|
77
|
+
</div>
|
78
|
+
<div id="subheader">
|
79
|
+
<h1>File</h1>
|
80
|
+
<small><select><option value="File">File</option>
|
81
|
+
<option value="File_objects"> - Objects</option>
|
82
|
+
<option value="File_permissions"> - Permissions</option>
|
83
|
+
<option value="File">File</option>
|
84
|
+
<option value="File_properties"> - Properties</option>
|
85
|
+
<option value="File_details"> - Details</option>
|
86
|
+
<option value="File_supported_platforms"> - Supported Platforms</option>
|
87
|
+
<option value="FileReader">FileReader</option>
|
88
|
+
<option value="FileReader_properties"> - Properties</option>
|
89
|
+
<option value="FileReader_methods"> - Methods</option>
|
90
|
+
<option value="FileReader_details"> - Details</option>
|
91
|
+
<option value="FileReader_supported_platforms"> - Supported Platforms</option>
|
92
|
+
<option value="FileReader_read_as_data_url"> - Read As Data URL </option>
|
93
|
+
<option value="FileReader_quick_example"> - Quick Example</option>
|
94
|
+
<option value="FileReader_read_as_text"> - Read As Text</option>
|
95
|
+
<option value="FileReader_quick_example"> - Quick Example</option>
|
96
|
+
<option value="FileReader_abort_quick_example"> - Abort Quick Example</option>
|
97
|
+
<option value="FileReader_full_example"> - Full Example</option>
|
98
|
+
<option value="FileReader_ios_quirks"> - iOS Quirks</option>
|
99
|
+
<option value="FileWriter">FileWriter</option>
|
100
|
+
<option value="FileWriter_properties"> - Properties</option>
|
101
|
+
<option value="FileWriter_methods"> - Methods</option>
|
102
|
+
<option value="FileWriter_details"> - Details</option>
|
103
|
+
<option value="FileWriter_supported_platforms"> - Supported Platforms</option>
|
104
|
+
<option value="FileWriter_seek_quick_example"> - Seek Quick Example</option>
|
105
|
+
<option value="FileWriter_truncate_quick_example"> - Truncate Quick Example</option>
|
106
|
+
<option value="FileWriter_write_quick_example"> - Write Quick Example</option>
|
107
|
+
<option value="FileWriter_append_quick_example"> - Append Quick Example</option>
|
108
|
+
<option value="FileWriter_abort_quick_example"> - Abort Quick Example</option>
|
109
|
+
<option value="FileWriter_full_example"> - Full Example</option>
|
110
|
+
<option value="FileSystem">FileSystem</option>
|
111
|
+
<option value="FileSystem_properties"> - Properties</option>
|
112
|
+
<option value="FileSystem_details"> - Details</option>
|
113
|
+
<option value="FileSystem_supported_platforms"> - Supported Platforms</option>
|
114
|
+
<option value="FileSystem_file_system_quick_example"> -
|
115
|
+
File System Quick Example</option>
|
116
|
+
<option value="FileSystem_full_example"> - Full Example</option>
|
117
|
+
<option value="FileEntry">FileEntry</option>
|
118
|
+
<option value="FileEntry_properties"> - Properties</option>
|
119
|
+
<option value="FileEntry_methods"> - Methods</option>
|
120
|
+
<option value="FileEntry_supported_platforms"> - Supported Platforms</option>
|
121
|
+
<option value="FileEntry_getmetadata"> - getMetadata</option>
|
122
|
+
<option value="FileEntry_setmetadata"> - setMetadata</option>
|
123
|
+
<option value="FileEntry_moveto"> - moveTo</option>
|
124
|
+
<option value="FileEntry_copyto"> - copyTo</option>
|
125
|
+
<option value="FileEntry_tourl"> - toURL</option>
|
126
|
+
<option value="FileEntry_remove"> - remove</option>
|
127
|
+
<option value="FileEntry_getparent"> - getParent</option>
|
128
|
+
<option value="FileEntry_createwriter"> - createWriter</option>
|
129
|
+
<option value="FileEntry_file"> - file</option>
|
130
|
+
<option value="DirectoryEntry">DirectoryEntry</option>
|
131
|
+
<option value="DirectoryEntry_properties"> - Properties</option>
|
132
|
+
<option value="DirectoryEntry_methods"> - Methods</option>
|
133
|
+
<option value="DirectoryEntry_supported_platforms"> - Supported Platforms</option>
|
134
|
+
<option value="DirectoryEntry_getmetadata"> - getMetadata</option>
|
135
|
+
<option value="DirectoryEntry_setmetadata"> - setMetadata</option>
|
136
|
+
<option value="DirectoryEntry_moveto"> - moveTo</option>
|
137
|
+
<option value="DirectoryEntry_copyto"> - copyTo</option>
|
138
|
+
<option value="DirectoryEntry_tourl"> - toURL</option>
|
139
|
+
<option value="DirectoryEntry_remove"> - remove</option>
|
140
|
+
<option value="DirectoryEntry_getparent"> - getParent</option>
|
141
|
+
<option value="DirectoryEntry_createreader"> - createReader</option>
|
142
|
+
<option value="DirectoryEntry_getdirectory"> - getDirectory</option>
|
143
|
+
<option value="DirectoryEntry_getfile"> - getFile</option>
|
144
|
+
<option value="DirectoryEntry_removerecursively"> - removeRecursively</option>
|
145
|
+
<option value="DirectoryReader">DirectoryReader</option>
|
146
|
+
<option value="DirectoryReader_methods"> - Methods</option>
|
147
|
+
<option value="DirectoryReader_supported_platforms"> - Supported Platforms</option>
|
148
|
+
<option value="DirectoryReader_readentries"> - readEntries</option>
|
149
|
+
<option value="FileTransfer">FileTransfer</option>
|
150
|
+
<option value="FileTransfer_properties"> - Properties</option>
|
151
|
+
<option value="FileTransfer_methods"> - Methods</option>
|
152
|
+
<option value="FileTransfer_details"> - Details</option>
|
153
|
+
<option value="FileTransfer_supported_platforms"> - Supported Platforms</option>
|
154
|
+
<option value="FileTransfer_upload"> - upload</option>
|
155
|
+
<option value="FileTransfer_ios_quirks"> - iOS Quirks</option>
|
156
|
+
<option value="FileTransfer_download"> - download</option>
|
157
|
+
<option value="FileUploadOptions">FileUploadOptions</option>
|
158
|
+
<option value="FileUploadOptions_properties"> - Properties</option>
|
159
|
+
<option value="FileUploadOptions_description"> - Description</option>
|
160
|
+
<option value="FileUploadOptions_wp7_quirk"> - WP7 Quirk</option>
|
161
|
+
<option value="FileUploadResult">FileUploadResult</option>
|
162
|
+
<option value="FileUploadResult_properties"> - Properties</option>
|
163
|
+
<option value="FileUploadResult_description"> - Description</option>
|
164
|
+
<option value="FileUploadResult_ios_quirks"> - iOS Quirks</option>
|
165
|
+
<option value="Flags">Flags</option>
|
166
|
+
<option value="Flags_properties"> - Properties</option>
|
167
|
+
<option value="Flags_supported_platforms"> - Supported Platforms</option>
|
168
|
+
<option value="Flags_quick_example"> - Quick Example</option>
|
169
|
+
<option value="LocalFileSystem">LocalFileSystem</option>
|
170
|
+
<option value="LocalFileSystem_methods"> - Methods</option>
|
171
|
+
<option value="LocalFileSystem_constants"> - Constants</option>
|
172
|
+
<option value="LocalFileSystem_details"> - Details</option>
|
173
|
+
<option value="LocalFileSystem_supported_platforms"> - Supported Platforms</option>
|
174
|
+
<option value="LocalFileSystem_request_file_system_quick_example"> - Request File System Quick Example</option>
|
175
|
+
<option value="LocalFileSystem_resolve_local_file_system_uri_quick_example"> - Resolve Local File System URI Quick Example</option>
|
176
|
+
<option value="LocalFileSystem_full_example"> - Full Example</option>
|
177
|
+
<option value="Metadata">Metadata</option>
|
178
|
+
<option value="Metadata_properties"> - Properties</option>
|
179
|
+
<option value="Metadata_details"> - Details</option>
|
180
|
+
<option value="Metadata_supported_platforms"> - Supported Platforms</option>
|
181
|
+
<option value="Metadata_quick_example"> - Quick Example</option>
|
182
|
+
<option value="FileError">FileError</option>
|
183
|
+
<option value="FileError_properties"> - Properties</option>
|
184
|
+
<option value="FileError_constants"> - Constants</option>
|
185
|
+
<option value="FileError_description"> - Description</option>
|
186
|
+
<option value="FileTransferError">FileTransferError</option>
|
187
|
+
<option value="FileTransferError_properties"> - Properties</option>
|
188
|
+
<option value="FileTransferError_constants"> - Constants</option>
|
189
|
+
<option value="FileTransferError_description"> - Description</option></select></small>
|
190
|
+
</div>
|
191
|
+
|
192
|
+
<div id="sidebar">
|
193
|
+
<div class="vertical_divider"></div>
|
194
|
+
<h1>API Reference</h1>
|
195
|
+
<ul>
|
196
|
+
<li><a href="cordova_accelerometer_accelerometer.md.html#Accelerometer">Accelerometer</a></li>
|
197
|
+
<li><a href="cordova_camera_camera.md.html#Camera">Camera</a></li>
|
198
|
+
<li><a href="cordova_media_capture_capture.md.html#Capture">Capture</a></li>
|
199
|
+
<li><a href="cordova_compass_compass.md.html#Compass">Compass</a></li>
|
200
|
+
<li><a href="cordova_connection_connection.md.html#Connection">Connection</a></li>
|
201
|
+
<li><a href="cordova_contacts_contacts.md.html#Contacts">Contacts</a></li>
|
202
|
+
<li><a href="cordova_device_device.md.html#Device">Device</a></li>
|
203
|
+
<li><a href="cordova_events_events.md.html#Events">Events</a></li>
|
204
|
+
<li><a href="cordova_file_file.md.html#File">File</a></li>
|
205
|
+
<li><a href="cordova_geolocation_geolocation.md.html#Geolocation">Geolocation</a></li>
|
206
|
+
<li><a href="cordova_media_media.md.html#Media">Media</a></li>
|
207
|
+
<li><a href="cordova_notification_notification.md.html#Notification">Notification</a></li>
|
208
|
+
<li><a href="cordova_storage_storage.md.html#Storage">Storage</a></li>
|
209
|
+
</ul>
|
210
|
+
<h1>Guides</h1>
|
211
|
+
<ul>
|
212
|
+
<li><a href="guide_getting-started_index.md.html#Getting%20Started%20Guides">Getting Started Guides</a></li>
|
213
|
+
<li><a href="guide_command-line_index.md.html#Command-Line%20Usage">Command-Line Usage</a></li>
|
214
|
+
<li><a href="guide_upgrading_index.md.html#Upgrading%20Guides">Upgrading Guides</a></li>
|
215
|
+
<li><a href="guide_plugin-development_index.md.html#Plugin%20Development%20Guide">Plugin Development Guide</a></li>
|
216
|
+
<li><a href="guide_whitelist_index.md.html#Domain%20Whitelist%20Guide">Domain Whitelist Guide</a></li>
|
217
|
+
<li><a href="guide_cordova-webview_index.md.html#Embedding%20WebView">Embedding WebView</a></li>
|
218
|
+
<li><a href="_index.html">Keyword Index</a></li>
|
219
|
+
</ul>
|
220
|
+
</div>
|
221
|
+
|
222
|
+
<div id="scrollable">
|
223
|
+
<div id="content">
|
224
|
+
<h1><a name="File">File</a></h1>
|
225
|
+
|
226
|
+
<blockquote>
|
227
|
+
<p>This API is based on the W3C <a class="external" href="http://www.w3.org/TR/FileAPI"></a><a href="cordova_file_file.md.html#File">File</a> API. An API to read, write and navigate file system hierarchies.</p>
|
228
|
+
</blockquote>
|
229
|
+
|
230
|
+
<h2>
|
231
|
+
<a name="File_objects">Objects</a>
|
232
|
+
</h2>
|
233
|
+
|
234
|
+
<ul>
|
235
|
+
<li><a href="cordova_file_file.md.html#DirectoryEntry">DirectoryEntry</a></li>
|
236
|
+
<li><a href="cordova_file_file.md.html#DirectoryReader">DirectoryReader</a></li>
|
237
|
+
<li><a href="cordova_file_file.md.html#File">File</a></li>
|
238
|
+
<li><a href="cordova_file_file.md.html#FileEntry">FileEntry</a></li>
|
239
|
+
<li><a href="cordova_file_file.md.html#FileError">FileError</a></li>
|
240
|
+
<li><a href="cordova_file_file.md.html#FileReader">FileReader</a></li>
|
241
|
+
<li><a href="cordova_file_file.md.html#FileSystem">FileSystem</a></li>
|
242
|
+
<li><a href="cordova_file_file.md.html#FileTransfer">FileTransfer</a></li>
|
243
|
+
<li><a href="cordova_file_file.md.html#FileTransferError">FileTransferError</a></li>
|
244
|
+
<li><a href="cordova_file_file.md.html#FileUploadOptions">FileUploadOptions</a></li>
|
245
|
+
<li><a href="cordova_file_file.md.html#FileUploadResult">FileUploadResult</a></li>
|
246
|
+
<li><a href="cordova_file_file.md.html#FileWriter">FileWriter</a></li>
|
247
|
+
<li><a href="cordova_file_file.md.html#Flags">Flags</a></li>
|
248
|
+
<li><a href="cordova_file_file.md.html#LocalFileSystem">LocalFileSystem</a></li>
|
249
|
+
<li><a href="cordova_file_file.md.html#Metadata">Metadata</a></li>
|
250
|
+
</ul>
|
251
|
+
<h2>
|
252
|
+
<a name="File_permissions">Permissions</a>
|
253
|
+
</h2>
|
254
|
+
|
255
|
+
<h3>Android</h3>
|
256
|
+
|
257
|
+
<h4>app/res/xml/plugins.xml</h4>
|
258
|
+
|
259
|
+
<pre class="prettyprint"><code><plugin name="<a href="cordova_file_file.md.html#File">File</a>" value="org.apache.cordova.FileUtils" />
|
260
|
+
<plugin name="<a href="cordova_file_file.md.html#FileTransfer">FileTransfer</a>" value="org.apache.cordova.<a href="cordova_file_file.md.html#FileTransfer">FileTransfer</a>" />
|
261
|
+
</code></pre>
|
262
|
+
|
263
|
+
<h4>app/AndroidManifest.xml</h4>
|
264
|
+
|
265
|
+
<pre class="prettyprint"><code><uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
266
|
+
</code></pre>
|
267
|
+
|
268
|
+
<h3>Bada</h3>
|
269
|
+
|
270
|
+
<pre class="prettyprint"><code>No permissions are required.
|
271
|
+
</code></pre>
|
272
|
+
|
273
|
+
<h3>BlackBerry WebWorks</h3>
|
274
|
+
|
275
|
+
<h4>www/plugins.xml</h4>
|
276
|
+
|
277
|
+
<pre class="prettyprint"><code><plugin name="<a href="cordova_file_file.md.html#File">File</a>" value="org.apache.cordova.file.FileManager" />
|
278
|
+
<plugin name="<a href="cordova_file_file.md.html#FileTransfer">FileTransfer</a>" value="org.apache.cordova.http.<a href="cordova_file_file.md.html#FileTransfer">FileTransfer</a>" />
|
279
|
+
</code></pre>
|
280
|
+
|
281
|
+
<h4>www/config.xml</h4>
|
282
|
+
|
283
|
+
<pre class="prettyprint"><code><feature id="blackberry.io.file" required="true" version="1.0.0.0" />
|
284
|
+
<feature id="blackberry.utils" required="true" version="1.0.0.0" />
|
285
|
+
<feature id="blackberry.io.dir" required="true" version="1.0.0.0" />
|
286
|
+
<rim:permissions>
|
287
|
+
<rim:permit>access_shared</rim:permit>
|
288
|
+
</rim:permissions>
|
289
|
+
</code></pre>
|
290
|
+
|
291
|
+
<h3>iOS</h3>
|
292
|
+
|
293
|
+
<h4>App/Supporting Files/Cordova.plist</h4>
|
294
|
+
|
295
|
+
<pre class="prettyprint"><code><key>Plugins</key>
|
296
|
+
<dict>
|
297
|
+
<key><a href="cordova_file_file.md.html#File">File</a></key>
|
298
|
+
<string>CDVFile</string>
|
299
|
+
</dict>
|
300
|
+
|
301
|
+
<key>Plugins</key>
|
302
|
+
<dict>
|
303
|
+
<key><a href="cordova_file_file.md.html#FileTransfer">FileTransfer</a></key>
|
304
|
+
<string>CDVFileTransfer</string>
|
305
|
+
</dict>
|
306
|
+
</code></pre>
|
307
|
+
|
308
|
+
<h3>webOS</h3>
|
309
|
+
|
310
|
+
<pre class="prettyprint"><code>No permissions are required.
|
311
|
+
</code></pre>
|
312
|
+
|
313
|
+
<h3>Windows Phone</h3>
|
314
|
+
|
315
|
+
<pre class="prettyprint"><code>No permissions are required.
|
316
|
+
</code></pre>
|
317
|
+
|
318
|
+
<hr>
|
319
|
+
<h1><a name="File">File</a></h1>
|
320
|
+
|
321
|
+
<p>This object contains attributes of a single file.</p>
|
322
|
+
|
323
|
+
<h2>
|
324
|
+
<a name="File_properties">Properties</a>
|
325
|
+
</h2>
|
326
|
+
|
327
|
+
<ul>
|
328
|
+
<li>
|
329
|
+
<strong>name:</strong> The name of the file. <em>(DOMString)</em>
|
330
|
+
</li>
|
331
|
+
<li>
|
332
|
+
<strong>fullPath:</strong> The full path of the file including the file name. <em>(DOMString)</em>
|
333
|
+
</li>
|
334
|
+
<li>
|
335
|
+
<strong>type:</strong> The mime type of the file. <em>(DOMString)</em>
|
336
|
+
</li>
|
337
|
+
<li>
|
338
|
+
<strong>lastModifiedDate:</strong> The last time the file was modified. <em>(Date)</em>
|
339
|
+
</li>
|
340
|
+
<li>
|
341
|
+
<strong>size:</strong> The size of the file in bytes. <em>(long)</em>
|
342
|
+
</li>
|
343
|
+
</ul>
|
344
|
+
<h2>
|
345
|
+
<a name="File_details">Details</a>
|
346
|
+
</h2>
|
347
|
+
|
348
|
+
<p>The <code><a href="cordova_file_file.md.html#File">File</a></code> object contains attributes of a single file. You can get an instance of a <a href="cordova_file_file.md.html#File">File</a> object by calling the <strong>file</strong> method of a <code><a href="cordova_file_file.md.html#FileEntry">FileEntry</a></code> object.</p>
|
349
|
+
|
350
|
+
<h2>
|
351
|
+
<a name="File_supported_platforms">Supported Platforms</a>
|
352
|
+
</h2>
|
353
|
+
|
354
|
+
<ul>
|
355
|
+
<li>Android</li>
|
356
|
+
<li>BlackBerry WebWorks (OS 5.0 and higher)</li>
|
357
|
+
<li>iOS</li>
|
358
|
+
<li>Windows Phone 7 ( Mango )</li>
|
359
|
+
</ul>
|
360
|
+
<hr>
|
361
|
+
<h1><a name="FileReader">FileReader</a></h1>
|
362
|
+
|
363
|
+
<p><a href="cordova_file_file.md.html#FileReader">FileReader</a> is an object that allows one to read a file.</p>
|
364
|
+
|
365
|
+
<h2>
|
366
|
+
<a name="FileReader_properties">Properties</a>
|
367
|
+
</h2>
|
368
|
+
|
369
|
+
<ul>
|
370
|
+
<li>
|
371
|
+
<strong>readyState:</strong> One of the three states the reader can be in EMPTY, LOADING or DONE.</li>
|
372
|
+
<li>
|
373
|
+
<strong>result:</strong> The contents of the file that has been read. <em>(DOMString)</em>
|
374
|
+
</li>
|
375
|
+
<li>
|
376
|
+
<strong>error:</strong> An object containing errors. <em>(<a href="cordova_file_file.md.html#FileError">FileError</a>)</em>
|
377
|
+
</li>
|
378
|
+
<li>
|
379
|
+
<strong>onloadstart:</strong> Called when the read starts. . <em>(Function)</em>
|
380
|
+
</li>
|
381
|
+
<li>
|
382
|
+
<strong>onprogress:</strong> Called while reading the file, reports progress (progess.loaded/progress.total). <em>(Function)</em> -NOT SUPPORTED</li>
|
383
|
+
<li>
|
384
|
+
<strong>onload:</strong> Called when the read has successfully completed. <em>(Function)</em>
|
385
|
+
</li>
|
386
|
+
<li>
|
387
|
+
<strong>onabort:</strong> Called when the read has been aborted. For instance, by invoking the abort() method. <em>(Function)</em>
|
388
|
+
</li>
|
389
|
+
<li>
|
390
|
+
<strong>onerror:</strong> Called when the read has failed. <em>(Function)</em>
|
391
|
+
</li>
|
392
|
+
<li>
|
393
|
+
<strong>onloadend:</strong> Called when the request has completed (either in success or failure). <em>(Function)</em>
|
394
|
+
</li>
|
395
|
+
</ul>
|
396
|
+
<h2>
|
397
|
+
<a name="FileReader_methods">Methods</a>
|
398
|
+
</h2>
|
399
|
+
|
400
|
+
<ul>
|
401
|
+
<li>
|
402
|
+
<strong>abort</strong>: Aborts reading file. </li>
|
403
|
+
<li>
|
404
|
+
<strong>readAsDataURL</strong>: Read file and return data as a base64 encoded data url.</li>
|
405
|
+
<li>
|
406
|
+
<strong>readAsText</strong>: Reads text file.</li>
|
407
|
+
</ul>
|
408
|
+
<h2>
|
409
|
+
<a name="FileReader_details">Details</a>
|
410
|
+
</h2>
|
411
|
+
|
412
|
+
<p>The <code><a href="cordova_file_file.md.html#FileReader">FileReader</a></code> object is a way to read files from the devices file system. Files can be read as text or as a base64 data encoded string. Users register their own event listners to receive the loadstart, progress, load, loadend, error and abort events.</p>
|
413
|
+
|
414
|
+
<h2>
|
415
|
+
<a name="FileReader_supported_platforms">Supported Platforms</a>
|
416
|
+
</h2>
|
417
|
+
|
418
|
+
<ul>
|
419
|
+
<li>Android</li>
|
420
|
+
<li>BlackBerry WebWorks (OS 5.0 and higher)</li>
|
421
|
+
<li>iOS</li>
|
422
|
+
<li>Windows Phone 7 ( Mango )</li>
|
423
|
+
</ul>
|
424
|
+
<h2>
|
425
|
+
<a name="FileReader_read_as_data_url">Read As Data URL </a>
|
426
|
+
</h2>
|
427
|
+
|
428
|
+
<p><strong>Parameters:</strong>
|
429
|
+
- file - the file object to read</p>
|
430
|
+
|
431
|
+
<h2>
|
432
|
+
<a name="FileReader_quick_example">Quick Example</a>
|
433
|
+
</h2>
|
434
|
+
|
435
|
+
<pre class="prettyprint"><code>function win(file) {
|
436
|
+
var reader = new <a href="cordova_file_file.md.html#FileReader">FileReader</a>();
|
437
|
+
reader.onloadend = function(evt) {
|
438
|
+
console.log("read success");
|
439
|
+
console.log(evt.target.result);
|
440
|
+
};
|
441
|
+
reader.readAsDataURL(file);
|
442
|
+
};
|
443
|
+
|
444
|
+
var fail = function(evt) {
|
445
|
+
console.log(error.code);
|
446
|
+
};
|
447
|
+
|
448
|
+
entry.file(win, fail);
|
449
|
+
</code></pre>
|
450
|
+
|
451
|
+
<h2>
|
452
|
+
<a name="FileReader_read_as_text">Read As Text</a>
|
453
|
+
</h2>
|
454
|
+
|
455
|
+
<p><strong>Parameters:</strong></p>
|
456
|
+
|
457
|
+
<ul>
|
458
|
+
<li>file - the file object to read</li>
|
459
|
+
<li>encoding - the encoding to use to encode the file's content. Default is UTF8.</li>
|
460
|
+
</ul>
|
461
|
+
<h2>
|
462
|
+
<a name="FileReader_quick_example">Quick Example</a>
|
463
|
+
</h2>
|
464
|
+
|
465
|
+
<pre class="prettyprint"><code>function win(file) {
|
466
|
+
var reader = new <a href="cordova_file_file.md.html#FileReader">FileReader</a>();
|
467
|
+
reader.onloadend = function(evt) {
|
468
|
+
console.log("read success");
|
469
|
+
console.log(evt.target.result);
|
470
|
+
};
|
471
|
+
reader.readAsText(file);
|
472
|
+
};
|
473
|
+
|
474
|
+
var fail = function(evt) {
|
475
|
+
console.log(error.code);
|
476
|
+
};
|
477
|
+
|
478
|
+
entry.file(win, fail);
|
479
|
+
</code></pre>
|
480
|
+
|
481
|
+
<h2>
|
482
|
+
<a name="FileReader_abort_quick_example">Abort Quick Example</a>
|
483
|
+
</h2>
|
484
|
+
|
485
|
+
<pre class="prettyprint"><code>function win(file) {
|
486
|
+
var reader = new <a href="cordova_file_file.md.html#FileReader">FileReader</a>();
|
487
|
+
reader.onloadend = function(evt) {
|
488
|
+
console.log("read success");
|
489
|
+
console.log(evt.target.result);
|
490
|
+
};
|
491
|
+
reader.readAsText(file);
|
492
|
+
reader.abort();
|
493
|
+
};
|
494
|
+
|
495
|
+
function fail(error) {
|
496
|
+
console.log(error.code);
|
497
|
+
}
|
498
|
+
|
499
|
+
entry.file(win, fail);
|
500
|
+
</code></pre>
|
501
|
+
|
502
|
+
<h2>
|
503
|
+
<a name="FileReader_full_example">Full Example</a>
|
504
|
+
</h2>
|
505
|
+
|
506
|
+
<pre class="prettyprint"><code><!DOCTYPE html>
|
507
|
+
<html>
|
508
|
+
<head>
|
509
|
+
<title><a href="cordova_file_file.md.html#FileReader">FileReader</a> Example</title>
|
510
|
+
|
511
|
+
<script type="text/javascript" charset="utf-8" src="cordova-2.0.0.js"></script>
|
512
|
+
<script type="text/javascript" charset="utf-8">
|
513
|
+
|
514
|
+
// Wait for Cordova to load
|
515
|
+
//
|
516
|
+
function onLoad() {
|
517
|
+
document.addEventListener("<a href="cordova_events_events.md.html#deviceready">deviceready</a>", onDeviceReady, false);
|
518
|
+
}
|
519
|
+
|
520
|
+
// Cordova is ready
|
521
|
+
//
|
522
|
+
function onDeviceReady() {
|
523
|
+
window.requestFileSystem(<a href="cordova_file_file.md.html#LocalFileSystem">LocalFileSystem</a>.PERSISTENT, 0, gotFS, fail);
|
524
|
+
}
|
525
|
+
|
526
|
+
function gotFS(fileSystem) {
|
527
|
+
fileSystem.root.getFile("readme.txt", null, gotFileEntry, fail);
|
528
|
+
}
|
529
|
+
|
530
|
+
function gotFileEntry(fileEntry) {
|
531
|
+
fileEntry.file(gotFile, fail);
|
532
|
+
}
|
533
|
+
|
534
|
+
function gotFile(file){
|
535
|
+
readDataUrl(file);
|
536
|
+
readAsText(file);
|
537
|
+
}
|
538
|
+
|
539
|
+
function readDataUrl(file) {
|
540
|
+
var reader = new <a href="cordova_file_file.md.html#FileReader">FileReader</a>();
|
541
|
+
reader.onloadend = function(evt) {
|
542
|
+
console.log("Read as data URL");
|
543
|
+
console.log(evt.target.result);
|
544
|
+
};
|
545
|
+
reader.readAsDataURL(file);
|
546
|
+
}
|
547
|
+
|
548
|
+
function readAsText(file) {
|
549
|
+
var reader = new <a href="cordova_file_file.md.html#FileReader">FileReader</a>();
|
550
|
+
reader.onloadend = function(evt) {
|
551
|
+
console.log("Read as text");
|
552
|
+
console.log(evt.target.result);
|
553
|
+
};
|
554
|
+
reader.readAsText(file);
|
555
|
+
}
|
556
|
+
|
557
|
+
function fail(evt) {
|
558
|
+
console.log(evt.target.error.code);
|
559
|
+
}
|
560
|
+
|
561
|
+
</script>
|
562
|
+
</head>
|
563
|
+
<body>
|
564
|
+
<h1>Example</h1>
|
565
|
+
<p>Read <a href="cordova_file_file.md.html#File">File</a></p>
|
566
|
+
</body>
|
567
|
+
</html>
|
568
|
+
</code></pre>
|
569
|
+
|
570
|
+
<h2>
|
571
|
+
<a name="FileReader_ios_quirks">iOS Quirks</a>
|
572
|
+
</h2>
|
573
|
+
|
574
|
+
<ul>
|
575
|
+
<li>
|
576
|
+
<strong>encoding</strong> parameter is not supported, UTF8 encoding is always used.</li>
|
577
|
+
</ul>
|
578
|
+
<hr>
|
579
|
+
<h1><a name="FileWriter">FileWriter</a></h1>
|
580
|
+
|
581
|
+
<p><a href="cordova_file_file.md.html#FileWriter">FileWriter</a> is an object that allows one to write a file.</p>
|
582
|
+
|
583
|
+
<h2>
|
584
|
+
<a name="FileWriter_properties">Properties</a>
|
585
|
+
</h2>
|
586
|
+
|
587
|
+
<ul>
|
588
|
+
<li>
|
589
|
+
<strong>readyState:</strong> One of the three states the reader can be in INIT, WRITING or DONE.</li>
|
590
|
+
<li>
|
591
|
+
<strong>fileName:</strong> The name of the file to be written. <em>(DOMString)</em>
|
592
|
+
</li>
|
593
|
+
<li>
|
594
|
+
<strong>length:</strong> The length of the file to be written. <em>(long)</em>
|
595
|
+
</li>
|
596
|
+
<li>
|
597
|
+
<strong>position:</strong> The current position of the file pointer. <em>(long)</em>
|
598
|
+
</li>
|
599
|
+
<li>
|
600
|
+
<strong>error:</strong> An object containing errors. <em>(<a href="cordova_file_file.md.html#FileError">FileError</a>)</em>
|
601
|
+
</li>
|
602
|
+
<li>
|
603
|
+
<strong>onwritestart:</strong> Called when the write starts. . <em>(Function)</em>
|
604
|
+
</li>
|
605
|
+
<li>
|
606
|
+
<strong>onprogress:</strong> Called while writing the file, reports progress (progess.loaded/progress.total). <em>(Function)</em> -NOT SUPPORTED</li>
|
607
|
+
<li>
|
608
|
+
<strong>onwrite:</strong> Called when the request has completed successfully. <em>(Function)</em>
|
609
|
+
</li>
|
610
|
+
<li>
|
611
|
+
<strong>onabort:</strong> Called when the write has been aborted. For instance, by invoking the abort() method. <em>(Function)</em>
|
612
|
+
</li>
|
613
|
+
<li>
|
614
|
+
<strong>onerror:</strong> Called when the write has failed. <em>(Function)</em>
|
615
|
+
</li>
|
616
|
+
<li>
|
617
|
+
<strong>onwriteend:</strong> Called when the request has completed (either in success or failure). <em>(Function)</em>
|
618
|
+
</li>
|
619
|
+
</ul>
|
620
|
+
<h2>
|
621
|
+
<a name="FileWriter_methods">Methods</a>
|
622
|
+
</h2>
|
623
|
+
|
624
|
+
<ul>
|
625
|
+
<li>
|
626
|
+
<strong>abort</strong>: Aborts writing file. </li>
|
627
|
+
<li>
|
628
|
+
<strong>seek</strong>: Moves the file pointer to the byte specified.</li>
|
629
|
+
<li>
|
630
|
+
<strong>truncate</strong>: Shortens the file to the length specified.</li>
|
631
|
+
<li>
|
632
|
+
<strong>write</strong>: Writes data to the file with a UTF-8 encoding.</li>
|
633
|
+
</ul>
|
634
|
+
<h2>
|
635
|
+
<a name="FileWriter_details">Details</a>
|
636
|
+
</h2>
|
637
|
+
|
638
|
+
<p>The <code><a href="cordova_file_file.md.html#FileWriter">FileWriter</a></code> object is a way to write files to the device file system (UTF-8 encoded). Users register their own event listeners to receive the writestart, progress, write, writeend, error and abort events.</p>
|
639
|
+
|
640
|
+
<p>A <a href="cordova_file_file.md.html#FileWriter">FileWriter</a> is created for a single file. You can use it to write to a file multiple times. The <a href="cordova_file_file.md.html#FileWriter">FileWriter</a> maintains the file's position and length attributes, so you can seek and write anywhere in the file. By default, the <a href="cordova_file_file.md.html#FileWriter">FileWriter</a> writes to the beginning of the file (will overwrite existing data). Set the optional append boolean to true in the <a href="cordova_file_file.md.html#FileWriter">FileWriter</a>'s constructor to begin writing to the end of the file.</p>
|
641
|
+
|
642
|
+
<h2>
|
643
|
+
<a name="FileWriter_supported_platforms">Supported Platforms</a>
|
644
|
+
</h2>
|
645
|
+
|
646
|
+
<ul>
|
647
|
+
<li>Android</li>
|
648
|
+
<li>BlackBerry WebWorks (OS 5.0 and higher)</li>
|
649
|
+
<li>iOS</li>
|
650
|
+
<li>Windows Phone 7 ( Mango )</li>
|
651
|
+
</ul>
|
652
|
+
<h2>
|
653
|
+
<a name="FileWriter_seek_quick_example">Seek Quick Example</a>
|
654
|
+
</h2>
|
655
|
+
|
656
|
+
<pre class="prettyprint"><code>function win(writer) {
|
657
|
+
// fast forwards file pointer to end of file
|
658
|
+
writer.seek(writer.length);
|
659
|
+
};
|
660
|
+
|
661
|
+
var fail = function(evt) {
|
662
|
+
console.log(error.code);
|
663
|
+
};
|
664
|
+
|
665
|
+
entry.createWriter(win, fail);
|
666
|
+
</code></pre>
|
667
|
+
|
668
|
+
<h2>
|
669
|
+
<a name="FileWriter_truncate_quick_example">Truncate Quick Example</a>
|
670
|
+
</h2>
|
671
|
+
|
672
|
+
<pre class="prettyprint"><code>function win(writer) {
|
673
|
+
writer.truncate(10);
|
674
|
+
};
|
675
|
+
|
676
|
+
var fail = function(evt) {
|
677
|
+
console.log(error.code);
|
678
|
+
};
|
679
|
+
|
680
|
+
entry.createWriter(win, fail);
|
681
|
+
</code></pre>
|
682
|
+
|
683
|
+
<h2>
|
684
|
+
<a name="FileWriter_write_quick_example">Write Quick Example</a>
|
685
|
+
</h2>
|
686
|
+
|
687
|
+
<pre class="prettyprint"><code>function win(writer) {
|
688
|
+
writer.onwrite = function(evt) {
|
689
|
+
console.log("write success");
|
690
|
+
};
|
691
|
+
writer.write("some sample text");
|
692
|
+
};
|
693
|
+
|
694
|
+
var fail = function(evt) {
|
695
|
+
console.log(error.code);
|
696
|
+
};
|
697
|
+
|
698
|
+
entry.createWriter(win, fail);
|
699
|
+
</code></pre>
|
700
|
+
|
701
|
+
<h2>
|
702
|
+
<a name="FileWriter_append_quick_example">Append Quick Example</a>
|
703
|
+
</h2>
|
704
|
+
|
705
|
+
<pre class="prettyprint"><code>function win(writer) {
|
706
|
+
writer.onwrite = function(evt) {
|
707
|
+
console.log("write success");
|
708
|
+
};
|
709
|
+
writer.seek(writer.length);
|
710
|
+
writer.write("appended text");
|
711
|
+
};
|
712
|
+
|
713
|
+
var fail = function(evt) {
|
714
|
+
console.log(error.code);
|
715
|
+
};
|
716
|
+
|
717
|
+
entry.createWriter(win, fail);
|
718
|
+
</code></pre>
|
719
|
+
|
720
|
+
<h2>
|
721
|
+
<a name="FileWriter_abort_quick_example">Abort Quick Example</a>
|
722
|
+
</h2>
|
723
|
+
|
724
|
+
<pre class="prettyprint"><code>function win(writer) {
|
725
|
+
writer.onwrite = function(evt) {
|
726
|
+
console.log("write success");
|
727
|
+
};
|
728
|
+
writer.write("some sample text");
|
729
|
+
writer.abort();
|
730
|
+
};
|
731
|
+
|
732
|
+
var fail = function(evt) {
|
733
|
+
console.log(error.code);
|
734
|
+
};
|
735
|
+
|
736
|
+
entry.createWriter(win, fail);
|
737
|
+
</code></pre>
|
738
|
+
|
739
|
+
<h2>
|
740
|
+
<a name="FileWriter_full_example">Full Example</a>
|
741
|
+
</h2>
|
742
|
+
|
743
|
+
<pre class="prettyprint"><code><!DOCTYPE html>
|
744
|
+
<html>
|
745
|
+
<head>
|
746
|
+
<title><a href="cordova_file_file.md.html#FileWriter">FileWriter</a> Example</title>
|
747
|
+
|
748
|
+
<script type="text/javascript" charset="utf-8" src="cordova-2.0.0.js"></script>
|
749
|
+
<script type="text/javascript" charset="utf-8">
|
750
|
+
|
751
|
+
// Wait for Cordova to load
|
752
|
+
//
|
753
|
+
document.addEventListener("<a href="cordova_events_events.md.html#deviceready">deviceready</a>", onDeviceReady, false);
|
754
|
+
|
755
|
+
// Cordova is ready
|
756
|
+
//
|
757
|
+
function onDeviceReady() {
|
758
|
+
window.requestFileSystem(<a href="cordova_file_file.md.html#LocalFileSystem">LocalFileSystem</a>.PERSISTENT, 0, gotFS, fail);
|
759
|
+
}
|
760
|
+
|
761
|
+
function gotFS(fileSystem) {
|
762
|
+
fileSystem.root.getFile("readme.txt", {create: true, exclusive: false}, gotFileEntry, fail);
|
763
|
+
}
|
764
|
+
|
765
|
+
function gotFileEntry(fileEntry) {
|
766
|
+
fileEntry.createWriter(gotFileWriter, fail);
|
767
|
+
}
|
768
|
+
|
769
|
+
function gotFileWriter(writer) {
|
770
|
+
writer.onwriteend = function(evt) {
|
771
|
+
console.log("contents of file now 'some sample text'");
|
772
|
+
writer.truncate(11);
|
773
|
+
writer.onwriteend = function(evt) {
|
774
|
+
console.log("contents of file now 'some sample'");
|
775
|
+
writer.seek(4);
|
776
|
+
writer.write(" different text");
|
777
|
+
writer.onwriteend = function(evt){
|
778
|
+
console.log("contents of file now 'some different text'");
|
779
|
+
}
|
780
|
+
};
|
781
|
+
};
|
782
|
+
writer.write("some sample text");
|
783
|
+
}
|
784
|
+
|
785
|
+
function fail(error) {
|
786
|
+
console.log(error.code);
|
787
|
+
}
|
788
|
+
|
789
|
+
</script>
|
790
|
+
</head>
|
791
|
+
<body>
|
792
|
+
<h1>Example</h1>
|
793
|
+
<p>Write <a href="cordova_file_file.md.html#File">File</a></p>
|
794
|
+
</body>
|
795
|
+
</html>
|
796
|
+
</code></pre>
|
797
|
+
|
798
|
+
<hr>
|
799
|
+
<h1><a name="FileSystem">FileSystem</a></h1>
|
800
|
+
|
801
|
+
<p>This object represents a file system.</p>
|
802
|
+
|
803
|
+
<h2>
|
804
|
+
<a name="FileSystem_properties">Properties</a>
|
805
|
+
</h2>
|
806
|
+
|
807
|
+
<ul>
|
808
|
+
<li>
|
809
|
+
<strong>name:</strong> The name of the file system. <em>(DOMString)</em>
|
810
|
+
</li>
|
811
|
+
<li>
|
812
|
+
<strong>root:</strong> The root directory of the file system. <em>(<a href="cordova_file_file.md.html#DirectoryEntry">DirectoryEntry</a>)</em>
|
813
|
+
</li>
|
814
|
+
</ul>
|
815
|
+
<h2>
|
816
|
+
<a name="FileSystem_details">Details</a>
|
817
|
+
</h2>
|
818
|
+
|
819
|
+
<p>The <code><a href="cordova_file_file.md.html#FileSystem">FileSystem</a></code> object represents information about the file system. The name of the file system will be unique across the list of exposed file systems. The root property contains a <code><a href="cordova_file_file.md.html#DirectoryEntry">DirectoryEntry</a></code> object which represents the root directory of the file system.</p>
|
820
|
+
|
821
|
+
<h2>
|
822
|
+
<a name="FileSystem_supported_platforms">Supported Platforms</a>
|
823
|
+
</h2>
|
824
|
+
|
825
|
+
<ul>
|
826
|
+
<li>Android</li>
|
827
|
+
<li>BlackBerry WebWorks (OS 5.0 and higher)</li>
|
828
|
+
<li>iOS</li>
|
829
|
+
<li>Windows Phone 7 ( Mango )</li>
|
830
|
+
</ul>
|
831
|
+
<h2>
|
832
|
+
<a name="FileSystem_file_system_quick_example">
|
833
|
+
File System Quick Example</a>
|
834
|
+
</h2>
|
835
|
+
|
836
|
+
<pre class="prettyprint"><code>function onSuccess(fileSystem) {
|
837
|
+
console.log(fileSystem.name);
|
838
|
+
console.log(fileSystem.root.name);
|
839
|
+
}
|
840
|
+
|
841
|
+
// request the persistent file system
|
842
|
+
window.requestFileSystem(<a href="cordova_file_file.md.html#LocalFileSystem">LocalFileSystem</a>.PERSISTENT, 0, onSuccess, null);
|
843
|
+
</code></pre>
|
844
|
+
|
845
|
+
<h2>
|
846
|
+
<a name="FileSystem_full_example">Full Example</a>
|
847
|
+
</h2>
|
848
|
+
|
849
|
+
<pre class="prettyprint"><code><!DOCTYPE html>
|
850
|
+
<html>
|
851
|
+
<head>
|
852
|
+
<title><a href="cordova_file_file.md.html#File">File</a> System Example</title>
|
853
|
+
|
854
|
+
<script type="text/javascript" charset="utf-8" src="cordova-2.0.0.js"></script>
|
855
|
+
<script type="text/javascript" charset="utf-8">
|
856
|
+
|
857
|
+
// Wait for Cordova to load
|
858
|
+
//
|
859
|
+
document.addEventListener("<a href="cordova_events_events.md.html#deviceready">deviceready</a>", onDeviceReady, false);
|
860
|
+
|
861
|
+
// Cordova is ready
|
862
|
+
//
|
863
|
+
function onDeviceReady() {
|
864
|
+
window.requestFileSystem(<a href="cordova_file_file.md.html#LocalFileSystem">LocalFileSystem</a>.PERSISTENT, 0, onFileSystemSuccess, fail);
|
865
|
+
}
|
866
|
+
|
867
|
+
function onFileSystemSuccess(fileSystem) {
|
868
|
+
console.log(fileSystem.name);
|
869
|
+
console.log(fileSystem.root.name);
|
870
|
+
}
|
871
|
+
|
872
|
+
function fail(evt) {
|
873
|
+
console.log(evt.target.error.code);
|
874
|
+
}
|
875
|
+
|
876
|
+
</script>
|
877
|
+
</head>
|
878
|
+
<body>
|
879
|
+
<h1>Example</h1>
|
880
|
+
<p><a href="cordova_file_file.md.html#File">File</a> System</p>
|
881
|
+
</body>
|
882
|
+
</html>
|
883
|
+
</code></pre>
|
884
|
+
|
885
|
+
<hr>
|
886
|
+
<h1><a name="FileEntry">FileEntry</a></h1>
|
887
|
+
|
888
|
+
<p>This object represents a file on a file system. It is defined in the <a class="external" href="http://www.w3.org/TR/file-system-api/">W3C Directories and Systems</a> specification.</p>
|
889
|
+
|
890
|
+
<h2>
|
891
|
+
<a name="FileEntry_properties">Properties</a>
|
892
|
+
</h2>
|
893
|
+
|
894
|
+
<ul>
|
895
|
+
<li>
|
896
|
+
<strong>isFile:</strong> Always true. <em>(boolean)</em>
|
897
|
+
</li>
|
898
|
+
<li>
|
899
|
+
<strong>isDirectory:</strong> Always false. <em>(boolean)</em>
|
900
|
+
</li>
|
901
|
+
<li>
|
902
|
+
<strong>name:</strong> The name of the <a href="cordova_file_file.md.html#FileEntry">FileEntry</a>, excluding the path leading to it. <em>(DOMString)</em>
|
903
|
+
</li>
|
904
|
+
<li>
|
905
|
+
<strong>fullPath:</strong> The full absolute path from the root to the <a href="cordova_file_file.md.html#FileEntry">FileEntry</a>. <em>(DOMString)</em>
|
906
|
+
</li>
|
907
|
+
</ul>
|
908
|
+
<p>NOTE: The following attributes are defined by the W3C specification, but are <strong>not supported</strong> by Cordova:</p>
|
909
|
+
|
910
|
+
<ul>
|
911
|
+
<li>
|
912
|
+
<strong>filesystem:</strong> The file system on which the <a href="cordova_file_file.md.html#FileEntry">FileEntry</a> resides. <em>(<a href="cordova_file_file.md.html#FileSystem">FileSystem</a>)</em>
|
913
|
+
</li>
|
914
|
+
</ul>
|
915
|
+
<h2>
|
916
|
+
<a name="FileEntry_methods">Methods</a>
|
917
|
+
</h2>
|
918
|
+
|
919
|
+
<ul>
|
920
|
+
<li>
|
921
|
+
<strong>getMetadata</strong>: Look up metadata about a file.</li>
|
922
|
+
<li>
|
923
|
+
<strong>setMetadata</strong>: Set metadata on a file.</li>
|
924
|
+
<li>
|
925
|
+
<strong>moveTo</strong>: Move a file to a different location on the file system.</li>
|
926
|
+
<li>
|
927
|
+
<strong>copyTo</strong>: Copy a file to a different location on the file system.</li>
|
928
|
+
<li>
|
929
|
+
<strong>toURL</strong>: Return a URL that can be used to locate a file.</li>
|
930
|
+
<li>
|
931
|
+
<strong>remove</strong>: Delete a file.</li>
|
932
|
+
<li>
|
933
|
+
<strong>getParent</strong>: Look up the parent directory.</li>
|
934
|
+
<li>
|
935
|
+
<strong>createWriter</strong>: Creates a <a href="cordova_file_file.md.html#FileWriter">FileWriter</a> object that can be used to write to a file.</li>
|
936
|
+
<li>
|
937
|
+
<strong>file</strong>: Creates a <a href="cordova_file_file.md.html#File">File</a> object containing file properties.</li>
|
938
|
+
</ul>
|
939
|
+
<h2>
|
940
|
+
<a name="FileEntry_supported_platforms">Supported Platforms</a>
|
941
|
+
</h2>
|
942
|
+
|
943
|
+
<ul>
|
944
|
+
<li>Android</li>
|
945
|
+
<li>BlackBerry WebWorks (OS 5.0 and higher)</li>
|
946
|
+
<li>iOS</li>
|
947
|
+
<li>Windows Phone 7 ( Mango )</li>
|
948
|
+
</ul>
|
949
|
+
<h2>
|
950
|
+
<a name="FileEntry_getmetadata">getMetadata</a>
|
951
|
+
</h2>
|
952
|
+
|
953
|
+
<p>Look up metadata about a file.</p>
|
954
|
+
|
955
|
+
<p><strong>Parameters:</strong></p>
|
956
|
+
|
957
|
+
<ul>
|
958
|
+
<li>
|
959
|
+
<strong>successCallback</strong> - A callback that is called with a <a href="cordova_file_file.md.html#Metadata">Metadata</a> object. <em>(Function)</em>
|
960
|
+
</li>
|
961
|
+
<li>
|
962
|
+
<strong>errorCallback</strong> - A callback that is called if an error occurs retrieving the <a href="cordova_file_file.md.html#Metadata">Metadata</a>. Invoked with a <a href="cordova_file_file.md.html#FileError">FileError</a> object. <em>(Function)</em>
|
963
|
+
</li>
|
964
|
+
</ul>
|
965
|
+
<p><strong>Quick Example</strong></p>
|
966
|
+
|
967
|
+
<pre class="prettyprint"><code>function success(metadata) {
|
968
|
+
console.log("Last Modified: " + metadata.modificationTime);
|
969
|
+
}
|
970
|
+
|
971
|
+
function fail(error) {
|
972
|
+
alert(error.code);
|
973
|
+
}
|
974
|
+
|
975
|
+
// Request the metadata object for this entry
|
976
|
+
entry.getMetadata(success, fail);
|
977
|
+
</code></pre>
|
978
|
+
|
979
|
+
<h2>
|
980
|
+
<a name="FileEntry_setmetadata">setMetadata</a>
|
981
|
+
</h2>
|
982
|
+
|
983
|
+
<p>Set metadata on a file.
|
984
|
+
<strong>Only works on iOS currently</strong> - this will set the extended attributes of a file.</p>
|
985
|
+
|
986
|
+
<p><strong>Parameters:</strong></p>
|
987
|
+
|
988
|
+
<ul>
|
989
|
+
<li>
|
990
|
+
<strong>successCallback</strong> - A callback that is called when the metadata was successfully set. <em>(Function)</em>
|
991
|
+
</li>
|
992
|
+
<li>
|
993
|
+
<strong>errorCallback</strong> - A callback that is called when the metadata was not successfully set. <em>(Function)</em>
|
994
|
+
</li>
|
995
|
+
<li>
|
996
|
+
<strong>metadataObject</strong> - An object that contains the metadata keys and values. <em>(Object)</em>
|
997
|
+
</li>
|
998
|
+
</ul>
|
999
|
+
<p><strong>Quick Example</strong></p>
|
1000
|
+
|
1001
|
+
<pre class="prettyprint"><code>function success() {
|
1002
|
+
console.log("The metadata was successfully set.");
|
1003
|
+
}
|
1004
|
+
|
1005
|
+
function fail() {
|
1006
|
+
alert("There was an error in setting the metadata");
|
1007
|
+
}
|
1008
|
+
|
1009
|
+
// Set the metadata
|
1010
|
+
entry.setMetadata(success, fail, { "com.apple.MobileBackup": 1});
|
1011
|
+
</code></pre>
|
1012
|
+
|
1013
|
+
<p><strong>iOS Quirk</strong></p>
|
1014
|
+
|
1015
|
+
<ul>
|
1016
|
+
<li>only the <strong>"com.apple.MobileBackup"</strong> extended attribute is supported. Set the value to <strong>1</strong> to NOT enable the file to be backed up by iCloud. Set the value to <strong>0</strong> to re-enable the file to be backed up by iCloud.</li>
|
1017
|
+
</ul>
|
1018
|
+
<h2>
|
1019
|
+
<a name="FileEntry_moveto">moveTo</a>
|
1020
|
+
</h2>
|
1021
|
+
|
1022
|
+
<p>Move a file to a different location on the file system. It is an error to attempt to:</p>
|
1023
|
+
|
1024
|
+
<ul>
|
1025
|
+
<li>move a file into its parent if a name different from its current one isn't provided;</li>
|
1026
|
+
<li>move a file to a path occupied by a directory;</li>
|
1027
|
+
</ul>
|
1028
|
+
<p>In addition, an attempt to move a file on top of an existing file must attempt to delete and replace that file.</p>
|
1029
|
+
|
1030
|
+
<p><strong>Parameters:</strong></p>
|
1031
|
+
|
1032
|
+
<ul>
|
1033
|
+
<li>
|
1034
|
+
<strong>parent</strong> - The parent directory to which to move the file. <em>(<a href="cordova_file_file.md.html#DirectoryEntry">DirectoryEntry</a>)</em>
|
1035
|
+
</li>
|
1036
|
+
<li>
|
1037
|
+
<strong>newName</strong> - The new name of the file. Defaults to the current name if unspecified. <em>(DOMString)</em>
|
1038
|
+
</li>
|
1039
|
+
<li>
|
1040
|
+
<strong>successCallback</strong> - A callback that is called with the <a href="cordova_file_file.md.html#FileEntry">FileEntry</a> object of the new file. <em>(Function)</em>
|
1041
|
+
</li>
|
1042
|
+
<li>
|
1043
|
+
<strong>errorCallback</strong> - A callback that is called if an error occurs when attempting to move the file. Invoked with a <a href="cordova_file_file.md.html#FileError">FileError</a> object. <em>(Function)</em>
|
1044
|
+
</li>
|
1045
|
+
</ul>
|
1046
|
+
<p><strong>Quick Example</strong></p>
|
1047
|
+
|
1048
|
+
<pre class="prettyprint"><code>function success(entry) {
|
1049
|
+
console.log("New Path: " + entry.fullPath);
|
1050
|
+
}
|
1051
|
+
|
1052
|
+
function fail(error) {
|
1053
|
+
alert(error.code);
|
1054
|
+
}
|
1055
|
+
|
1056
|
+
function moveFile(entry) {
|
1057
|
+
var parent = document.getElementById('parent').value,
|
1058
|
+
parentName = parent.substring(parent.lastIndexOf('/')+1),
|
1059
|
+
parentEntry = new <a href="cordova_file_file.md.html#DirectoryEntry">DirectoryEntry</a>(parentName, parent);
|
1060
|
+
|
1061
|
+
// move the file to a new directory and rename it
|
1062
|
+
entry.moveTo(parentEntry, "newFile.txt", success, fail);
|
1063
|
+
}
|
1064
|
+
</code></pre>
|
1065
|
+
|
1066
|
+
<h2>
|
1067
|
+
<a name="FileEntry_copyto">copyTo</a>
|
1068
|
+
</h2>
|
1069
|
+
|
1070
|
+
<p>Copy a file to a new location on the file system. It is an error to attempt to:</p>
|
1071
|
+
|
1072
|
+
<ul>
|
1073
|
+
<li>copy a file into its parent if a name different from its current one is not provided.</li>
|
1074
|
+
</ul>
|
1075
|
+
<p><strong>Parameters:</strong></p>
|
1076
|
+
|
1077
|
+
<ul>
|
1078
|
+
<li>
|
1079
|
+
<strong>parent</strong> - The parent directory to which to copy the file. <em>(<a href="cordova_file_file.md.html#DirectoryEntry">DirectoryEntry</a>)</em>
|
1080
|
+
</li>
|
1081
|
+
<li>
|
1082
|
+
<strong>newName</strong> - The new name of the file. Defaults to the current name if unspecified. <em>(DOMString)</em>
|
1083
|
+
</li>
|
1084
|
+
<li>
|
1085
|
+
<strong>successCallback</strong> - A callback that is called with the <a href="cordova_file_file.md.html#FileEntry">FileEntry</a> object of the new file. <em>(Function)</em>
|
1086
|
+
</li>
|
1087
|
+
<li>
|
1088
|
+
<strong>errorCallback</strong> - A callback that is called if an error occurs when attempting to copy the file. Invoked with a <a href="cordova_file_file.md.html#FileError">FileError</a> object. <em>(Function)</em>
|
1089
|
+
</li>
|
1090
|
+
</ul>
|
1091
|
+
<p><strong>Quick Example</strong></p>
|
1092
|
+
|
1093
|
+
<pre class="prettyprint"><code>function win(entry) {
|
1094
|
+
console.log("New Path: " + entry.fullPath);
|
1095
|
+
}
|
1096
|
+
|
1097
|
+
function fail(error) {
|
1098
|
+
alert(error.code);
|
1099
|
+
}
|
1100
|
+
|
1101
|
+
function copyFile(entry) {
|
1102
|
+
var parent = document.getElementById('parent').value,
|
1103
|
+
parentName = parent.substring(parent.lastIndexOf('/')+1),
|
1104
|
+
parentEntry = new <a href="cordova_file_file.md.html#DirectoryEntry">DirectoryEntry</a>(parentName, parent);
|
1105
|
+
|
1106
|
+
// copy the file to a new directory and rename it
|
1107
|
+
entry.copyTo(parentEntry, "file.copy", success, fail);
|
1108
|
+
}
|
1109
|
+
</code></pre>
|
1110
|
+
|
1111
|
+
<h2>
|
1112
|
+
<a name="FileEntry_tourl">toURL</a>
|
1113
|
+
</h2>
|
1114
|
+
|
1115
|
+
<p>Returns a URL that can be used to locate the file.</p>
|
1116
|
+
|
1117
|
+
<p><strong>Quick Example</strong></p>
|
1118
|
+
|
1119
|
+
<pre class="prettyprint"><code>// Request the URL for this entry
|
1120
|
+
var fileURL = entry.toURL();
|
1121
|
+
console.log(fileURL);
|
1122
|
+
</code></pre>
|
1123
|
+
|
1124
|
+
<h2>
|
1125
|
+
<a name="FileEntry_remove">remove</a>
|
1126
|
+
</h2>
|
1127
|
+
|
1128
|
+
<p>Deletes a file.</p>
|
1129
|
+
|
1130
|
+
<p><strong>Parameters:</strong></p>
|
1131
|
+
|
1132
|
+
<ul>
|
1133
|
+
<li>
|
1134
|
+
<strong>successCallback</strong> - A callback that is called after the file has been deleted. Invoked with no parameters. <em>(Function)</em>
|
1135
|
+
</li>
|
1136
|
+
<li>
|
1137
|
+
<strong>errorCallback</strong> - A callback that is called if an error occurs when attempting to delete the file. Invoked with a <a href="cordova_file_file.md.html#FileError">FileError</a> object. <em>(Function)</em>
|
1138
|
+
</li>
|
1139
|
+
</ul>
|
1140
|
+
<p><strong>Quick Example</strong></p>
|
1141
|
+
|
1142
|
+
<pre class="prettyprint"><code>function success(entry) {
|
1143
|
+
console.log("Removal succeeded");
|
1144
|
+
}
|
1145
|
+
|
1146
|
+
function fail(error) {
|
1147
|
+
alert('Error removing file: ' + error.code);
|
1148
|
+
}
|
1149
|
+
|
1150
|
+
// remove the file
|
1151
|
+
entry.remove(success, fail);
|
1152
|
+
</code></pre>
|
1153
|
+
|
1154
|
+
<h2>
|
1155
|
+
<a name="FileEntry_getparent">getParent</a>
|
1156
|
+
</h2>
|
1157
|
+
|
1158
|
+
<p>Look up the parent <a href="cordova_file_file.md.html#DirectoryEntry">DirectoryEntry</a> containing the file.</p>
|
1159
|
+
|
1160
|
+
<p><strong>Parameters:</strong></p>
|
1161
|
+
|
1162
|
+
<ul>
|
1163
|
+
<li>
|
1164
|
+
<strong>successCallback</strong> - A callback that is called with the file's parent <a href="cordova_file_file.md.html#DirectoryEntry">DirectoryEntry</a>. <em>(Function)</em>
|
1165
|
+
</li>
|
1166
|
+
<li>
|
1167
|
+
<strong>errorCallback</strong> - A callback that is called if an error occurs when attempting to retrieve the parent <a href="cordova_file_file.md.html#DirectoryEntry">DirectoryEntry</a>. Invoked with a <a href="cordova_file_file.md.html#FileError">FileError</a> object. <em>(Function)</em>
|
1168
|
+
</li>
|
1169
|
+
</ul>
|
1170
|
+
<p><strong>Quick Example</strong></p>
|
1171
|
+
|
1172
|
+
<pre class="prettyprint"><code>function success(parent) {
|
1173
|
+
console.log("Parent Name: " + parent.name);
|
1174
|
+
}
|
1175
|
+
|
1176
|
+
function fail(error) {
|
1177
|
+
alert(error.code);
|
1178
|
+
}
|
1179
|
+
|
1180
|
+
// Get the parent <a href="cordova_file_file.md.html#DirectoryEntry">DirectoryEntry</a>
|
1181
|
+
entry.getParent(success, fail);
|
1182
|
+
</code></pre>
|
1183
|
+
|
1184
|
+
<h2>
|
1185
|
+
<a name="FileEntry_createwriter">createWriter</a>
|
1186
|
+
</h2>
|
1187
|
+
|
1188
|
+
<p>Create a <a href="cordova_file_file.md.html#FileWriter">FileWriter</a> object associated with the file that the <a href="cordova_file_file.md.html#FileEntry">FileEntry</a> represents.</p>
|
1189
|
+
|
1190
|
+
<p><strong>Parameters:</strong></p>
|
1191
|
+
|
1192
|
+
<ul>
|
1193
|
+
<li>
|
1194
|
+
<strong>successCallback</strong> - A callback that is called with a <a href="cordova_file_file.md.html#FileWriter">FileWriter</a> object. <em>(Function)</em>
|
1195
|
+
</li>
|
1196
|
+
<li>
|
1197
|
+
<strong>errorCallback</strong> - A callback that is called if an error occurs while attempting to create the <a href="cordova_file_file.md.html#FileWriter">FileWriter</a>. Invoked with a <a href="cordova_file_file.md.html#FileError">FileError</a> object. <em>(Function)</em>
|
1198
|
+
</li>
|
1199
|
+
</ul>
|
1200
|
+
<p><strong>Quick Example</strong></p>
|
1201
|
+
|
1202
|
+
<pre class="prettyprint"><code>function success(writer) {
|
1203
|
+
writer.write("Some text to the file");
|
1204
|
+
}
|
1205
|
+
|
1206
|
+
function fail(error) {
|
1207
|
+
alert(error.code);
|
1208
|
+
}
|
1209
|
+
|
1210
|
+
// create a <a href="cordova_file_file.md.html#FileWriter">FileWriter</a> to write to the file
|
1211
|
+
entry.createWriter(success, fail);
|
1212
|
+
</code></pre>
|
1213
|
+
|
1214
|
+
<h2>
|
1215
|
+
<a name="FileEntry_file">file</a>
|
1216
|
+
</h2>
|
1217
|
+
|
1218
|
+
<p>Return a <a href="cordova_file_file.md.html#File">File</a> object that represents the current state of the file that this <a href="cordova_file_file.md.html#FileEntry">FileEntry</a> represents.</p>
|
1219
|
+
|
1220
|
+
<p><strong>Parameters:</strong></p>
|
1221
|
+
|
1222
|
+
<ul>
|
1223
|
+
<li>
|
1224
|
+
<strong>successCallback</strong> - A callback that is called with a <a href="cordova_file_file.md.html#File">File</a> object. <em>(Function)</em>
|
1225
|
+
</li>
|
1226
|
+
<li>
|
1227
|
+
<strong>errorCallback</strong> - A callback that is called if an error occurs when creating the <a href="cordova_file_file.md.html#File">File</a> object (e.g. the underlying file no longer exists). Invoked with a <a href="cordova_file_file.md.html#FileError">FileError</a> object. <em>(Function)</em>
|
1228
|
+
</li>
|
1229
|
+
</ul>
|
1230
|
+
<p><strong>Quick Example</strong></p>
|
1231
|
+
|
1232
|
+
<pre class="prettyprint"><code>function success(file) {
|
1233
|
+
console.log("<a href="cordova_file_file.md.html#File">File</a> size: " + file.size);
|
1234
|
+
}
|
1235
|
+
|
1236
|
+
function fail(error) {
|
1237
|
+
alert("Unable to retrieve file properties: " + error.code);
|
1238
|
+
}
|
1239
|
+
|
1240
|
+
// obtain properties of a file
|
1241
|
+
entry.file(success, fail);
|
1242
|
+
</code></pre>
|
1243
|
+
|
1244
|
+
<hr>
|
1245
|
+
<h1><a name="DirectoryEntry">DirectoryEntry</a></h1>
|
1246
|
+
|
1247
|
+
<p>This object represents a directory on a file system. It is defined in the <a class="external" href="http://www.w3.org/TR/file-system-api/">W3C Directories and Systems</a> specification.</p>
|
1248
|
+
|
1249
|
+
<h2>
|
1250
|
+
<a name="DirectoryEntry_properties">Properties</a>
|
1251
|
+
</h2>
|
1252
|
+
|
1253
|
+
<ul>
|
1254
|
+
<li>
|
1255
|
+
<strong>isFile:</strong> Always false. <em>(boolean)</em>
|
1256
|
+
</li>
|
1257
|
+
<li>
|
1258
|
+
<strong>isDirectory:</strong> Always true. <em>(boolean)</em>
|
1259
|
+
</li>
|
1260
|
+
<li>
|
1261
|
+
<strong>name:</strong> The name of the <a href="cordova_file_file.md.html#DirectoryEntry">DirectoryEntry</a>, excluding the path leading to it. <em>(DOMString)</em>
|
1262
|
+
</li>
|
1263
|
+
<li>
|
1264
|
+
<strong>fullPath:</strong> The full absolute path from the root to the <a href="cordova_file_file.md.html#DirectoryEntry">DirectoryEntry</a>. <em>(DOMString)</em>
|
1265
|
+
</li>
|
1266
|
+
</ul>
|
1267
|
+
<p>NOTE: The following attributes are defined by the W3C specification, but are <strong>not supported</strong> by Cordova:</p>
|
1268
|
+
|
1269
|
+
<ul>
|
1270
|
+
<li>
|
1271
|
+
<strong>filesystem:</strong> The file system on which the <a href="cordova_file_file.md.html#DirectoryEntry">DirectoryEntry</a> resides. <em>(<a href="cordova_file_file.md.html#FileSystem">FileSystem</a>)</em>
|
1272
|
+
</li>
|
1273
|
+
</ul>
|
1274
|
+
<h2>
|
1275
|
+
<a name="DirectoryEntry_methods">Methods</a>
|
1276
|
+
</h2>
|
1277
|
+
|
1278
|
+
<p>The following methods can be invoked on a <a href="cordova_file_file.md.html#DirectoryEntry">DirectoryEntry</a> object:</p>
|
1279
|
+
|
1280
|
+
<ul>
|
1281
|
+
<li>
|
1282
|
+
<strong>getMetadata</strong>: Look up metadata about a directory.</li>
|
1283
|
+
<li>
|
1284
|
+
<strong>setMetadata</strong>: Set metadata on a directory.</li>
|
1285
|
+
<li>
|
1286
|
+
<strong>moveTo</strong>: Move a directory to a different location on the file system.</li>
|
1287
|
+
<li>
|
1288
|
+
<strong>copyTo</strong>: Copy a directory to a different location on the file system.</li>
|
1289
|
+
<li>
|
1290
|
+
<strong>toURL</strong>: Return a URL that can be used to locate a directory.</li>
|
1291
|
+
<li>
|
1292
|
+
<strong>remove</strong>: Delete a directory. The directory must be empty.</li>
|
1293
|
+
<li>
|
1294
|
+
<strong>getParent</strong>: Look up the parent directory.</li>
|
1295
|
+
<li>
|
1296
|
+
<strong>createReader</strong>: Create a new <a href="cordova_file_file.md.html#DirectoryReader">DirectoryReader</a> that can read entries from a directory.</li>
|
1297
|
+
<li>
|
1298
|
+
<strong>getDirectory</strong>: Create or look up a directory.</li>
|
1299
|
+
<li>
|
1300
|
+
<strong>getFile</strong>: Create or look up a file.</li>
|
1301
|
+
<li>
|
1302
|
+
<strong>removeRecursively</strong>: Delete a directory and all of its contents.</li>
|
1303
|
+
</ul>
|
1304
|
+
<h2>
|
1305
|
+
<a name="DirectoryEntry_supported_platforms">Supported Platforms</a>
|
1306
|
+
</h2>
|
1307
|
+
|
1308
|
+
<ul>
|
1309
|
+
<li>Android</li>
|
1310
|
+
<li>BlackBerry WebWorks (OS 5.0 and higher)</li>
|
1311
|
+
<li>iOS</li>
|
1312
|
+
<li>Windows Phone 7 ( Mango )</li>
|
1313
|
+
</ul>
|
1314
|
+
<h2>
|
1315
|
+
<a name="DirectoryEntry_getmetadata">getMetadata</a>
|
1316
|
+
</h2>
|
1317
|
+
|
1318
|
+
<p>Look up metadata about a directory.</p>
|
1319
|
+
|
1320
|
+
<p><strong>Parameters:</strong></p>
|
1321
|
+
|
1322
|
+
<ul>
|
1323
|
+
<li>
|
1324
|
+
<strong>successCallback</strong> - A callback that is called with a <a href="cordova_file_file.md.html#Metadata">Metadata</a> object. <em>(Function)</em>
|
1325
|
+
</li>
|
1326
|
+
<li>
|
1327
|
+
<strong>errorCallback</strong> - A callback that is called if an error occurs retrieving the <a href="cordova_file_file.md.html#Metadata">Metadata</a>. Invoked with a <a href="cordova_file_file.md.html#FileError">FileError</a> object. <em>(Function)</em>
|
1328
|
+
</li>
|
1329
|
+
</ul>
|
1330
|
+
<p><strong>Quick Example</strong></p>
|
1331
|
+
|
1332
|
+
<pre class="prettyprint"><code>function success(metadata) {
|
1333
|
+
console.log("Last Modified: " + metadata.modificationTime);
|
1334
|
+
}
|
1335
|
+
|
1336
|
+
function fail(error) {
|
1337
|
+
alert(error.code);
|
1338
|
+
}
|
1339
|
+
|
1340
|
+
// Request the metadata object for this entry
|
1341
|
+
entry.getMetadata(success, fail);
|
1342
|
+
</code></pre>
|
1343
|
+
|
1344
|
+
<h2>
|
1345
|
+
<a name="DirectoryEntry_setmetadata">setMetadata</a>
|
1346
|
+
</h2>
|
1347
|
+
|
1348
|
+
<p>Set metadata on a directory.
|
1349
|
+
<strong>Only works on iOS currently</strong> - this will set the extended attributes of a directory.</p>
|
1350
|
+
|
1351
|
+
<p><strong>Parameters:</strong></p>
|
1352
|
+
|
1353
|
+
<ul>
|
1354
|
+
<li>
|
1355
|
+
<strong>successCallback</strong> - A callback that is called when the metadata was successfully set. <em>(Function)</em>
|
1356
|
+
</li>
|
1357
|
+
<li>
|
1358
|
+
<strong>errorCallback</strong> - A callback that is called when the metadata was not successfully set. <em>(Function)</em>
|
1359
|
+
</li>
|
1360
|
+
<li>
|
1361
|
+
<strong>metadataObject</strong> - An object that contains the metadata keys and values. <em>(Object)</em>
|
1362
|
+
</li>
|
1363
|
+
</ul>
|
1364
|
+
<p><strong>Quick Example</strong></p>
|
1365
|
+
|
1366
|
+
<pre class="prettyprint"><code>function success() {
|
1367
|
+
console.log("The metadata was successfully set.");
|
1368
|
+
}
|
1369
|
+
|
1370
|
+
function fail() {
|
1371
|
+
alert("There was an error in setting the metadata");
|
1372
|
+
}
|
1373
|
+
|
1374
|
+
// Set the metadata
|
1375
|
+
entry.setMetadata(success, fail, { "com.apple.MobileBackup": 1});
|
1376
|
+
</code></pre>
|
1377
|
+
|
1378
|
+
<p><strong>iOS Quirk</strong></p>
|
1379
|
+
|
1380
|
+
<ul>
|
1381
|
+
<li>only the <strong>"com.apple.MobileBackup"</strong> extended attribute is supported. Set the value to <strong>1</strong> to NOT enable the directory to be backed up by iCloud. Set the value to <strong>0</strong> to re-enable the directory to be backed up by iCloud.</li>
|
1382
|
+
</ul>
|
1383
|
+
<h2>
|
1384
|
+
<a name="DirectoryEntry_moveto">moveTo</a>
|
1385
|
+
</h2>
|
1386
|
+
|
1387
|
+
<p>Move a directory to a different location on the file system. It is an error to attempt to:</p>
|
1388
|
+
|
1389
|
+
<ul>
|
1390
|
+
<li>move a directory inside itself or to any child at any depth;</li>
|
1391
|
+
<li>move a directory into its parent if a name different from its current one is not provided;</li>
|
1392
|
+
<li>move a directory to a path occupied by a file;</li>
|
1393
|
+
<li>move a directory to a path occupied by a directory which is not empty.</li>
|
1394
|
+
</ul>
|
1395
|
+
<p>In addition, an attempt to move a directory on top of an existing empty directory must attempt to delete and replace that directory.</p>
|
1396
|
+
|
1397
|
+
<p><strong>Parameters:</strong></p>
|
1398
|
+
|
1399
|
+
<ul>
|
1400
|
+
<li>
|
1401
|
+
<strong>parent</strong> - The parent directory to which to move the directory. <em>(<a href="cordova_file_file.md.html#DirectoryEntry">DirectoryEntry</a>)</em>
|
1402
|
+
</li>
|
1403
|
+
<li>
|
1404
|
+
<strong>newName</strong> - The new name of the directory. Defaults to the current name if unspecified. <em>(DOMString)</em>
|
1405
|
+
</li>
|
1406
|
+
<li>
|
1407
|
+
<strong>successCallback</strong> - A callback that is called with the <a href="cordova_file_file.md.html#DirectoryEntry">DirectoryEntry</a> object of the new directory. <em>(Function)</em>
|
1408
|
+
</li>
|
1409
|
+
<li>
|
1410
|
+
<strong>errorCallback</strong> - A callback that is called if an error occurs when attempting to move the directory. Invoked with a <a href="cordova_file_file.md.html#FileError">FileError</a> object. <em>(Function)</em>
|
1411
|
+
</li>
|
1412
|
+
</ul>
|
1413
|
+
<p><strong>Quick Example</strong></p>
|
1414
|
+
|
1415
|
+
<pre class="prettyprint"><code>function success(entry) {
|
1416
|
+
console.log("New Path: " + entry.fullPath);
|
1417
|
+
}
|
1418
|
+
|
1419
|
+
function fail(error) {
|
1420
|
+
alert(error.code);
|
1421
|
+
}
|
1422
|
+
|
1423
|
+
function moveDir(entry) {
|
1424
|
+
var parent = document.getElementById('parent').value,
|
1425
|
+
parentName = parent.substring(parent.lastIndexOf('/')+1),
|
1426
|
+
newName = document.getElementById('newName').value,
|
1427
|
+
parentEntry = new <a href="cordova_file_file.md.html#DirectoryEntry">DirectoryEntry</a>(parentName, parent);
|
1428
|
+
|
1429
|
+
// move the directory to a new directory and rename it
|
1430
|
+
entry.moveTo(parentEntry, newName, success, fail);
|
1431
|
+
}
|
1432
|
+
</code></pre>
|
1433
|
+
|
1434
|
+
<h2>
|
1435
|
+
<a name="DirectoryEntry_copyto">copyTo</a>
|
1436
|
+
</h2>
|
1437
|
+
|
1438
|
+
<p>Copy a directory to a different location on the file system. It is an error to attempt to:</p>
|
1439
|
+
|
1440
|
+
<ul>
|
1441
|
+
<li>copy a directory inside itself at any depth;</li>
|
1442
|
+
<li>copy a directory into its parent if a name different from its current one is not provided.</li>
|
1443
|
+
</ul>
|
1444
|
+
<p>Directory copies are always recursive - that is, they copy all contents of the directory.</p>
|
1445
|
+
|
1446
|
+
<p><strong>Parameters:</strong></p>
|
1447
|
+
|
1448
|
+
<ul>
|
1449
|
+
<li>
|
1450
|
+
<strong>parent</strong> - The parent directory to which to copy the directory. <em>(<a href="cordova_file_file.md.html#DirectoryEntry">DirectoryEntry</a>)</em>
|
1451
|
+
</li>
|
1452
|
+
<li>
|
1453
|
+
<strong>newName</strong> - The new name of the directory. Defaults to the current name if unspecified. <em>(DOMString)</em>
|
1454
|
+
</li>
|
1455
|
+
<li>
|
1456
|
+
<strong>successCallback</strong> - A callback that is called with the <a href="cordova_file_file.md.html#DirectoryEntry">DirectoryEntry</a> object of the new directory. <em>(Function)</em>
|
1457
|
+
</li>
|
1458
|
+
<li>
|
1459
|
+
<strong>errorCallback</strong> - A callback that is called if an error occurs when attempting to copy the underlying directory. Invoked with a <a href="cordova_file_file.md.html#FileError">FileError</a> object. <em>(Function)</em>
|
1460
|
+
</li>
|
1461
|
+
</ul>
|
1462
|
+
<p><strong>Quick Example</strong></p>
|
1463
|
+
|
1464
|
+
<pre class="prettyprint"><code>function win(entry) {
|
1465
|
+
console.log("New Path: " + entry.fullPath);
|
1466
|
+
}
|
1467
|
+
|
1468
|
+
function fail(error) {
|
1469
|
+
alert(error.code);
|
1470
|
+
}
|
1471
|
+
|
1472
|
+
function copyDir(entry) {
|
1473
|
+
var parent = document.getElementById('parent').value,
|
1474
|
+
parentName = parent.substring(parent.lastIndexOf('/')+1),
|
1475
|
+
newName = document.getElementById('newName').value,
|
1476
|
+
parentEntry = new <a href="cordova_file_file.md.html#DirectoryEntry">DirectoryEntry</a>(parentName, parent);
|
1477
|
+
|
1478
|
+
// copy the directory to a new directory and rename it
|
1479
|
+
entry.copyTo(parentEntry, newName, success, fail);
|
1480
|
+
}
|
1481
|
+
</code></pre>
|
1482
|
+
|
1483
|
+
<h2>
|
1484
|
+
<a name="DirectoryEntry_tourl">toURL</a>
|
1485
|
+
</h2>
|
1486
|
+
|
1487
|
+
<p>Returns a URL that can be used to locate the directory.</p>
|
1488
|
+
|
1489
|
+
<p><strong>Quick Example</strong></p>
|
1490
|
+
|
1491
|
+
<pre class="prettyprint"><code>// Get the URL for this directory
|
1492
|
+
var dirURL = entry.toURL();
|
1493
|
+
console.log(dirURL);
|
1494
|
+
</code></pre>
|
1495
|
+
|
1496
|
+
<h2>
|
1497
|
+
<a name="DirectoryEntry_remove">remove</a>
|
1498
|
+
</h2>
|
1499
|
+
|
1500
|
+
<p>Deletes a directory. It is an error to attempt to:</p>
|
1501
|
+
|
1502
|
+
<ul>
|
1503
|
+
<li>delete a directory that is not empty;</li>
|
1504
|
+
<li>delete the root directory of a filesystem.</li>
|
1505
|
+
</ul>
|
1506
|
+
<p><strong>Parameters:</strong></p>
|
1507
|
+
|
1508
|
+
<ul>
|
1509
|
+
<li>
|
1510
|
+
<strong>successCallback</strong> - A callback that is called after the directory has been deleted. Invoked with no parameters. <em>(Function)</em>
|
1511
|
+
</li>
|
1512
|
+
<li>
|
1513
|
+
<strong>errorCallback</strong> - A callback that is called if an error occurs when attempting to delete the directory. Invoked with a <a href="cordova_file_file.md.html#FileError">FileError</a> object. <em>(Function)</em>
|
1514
|
+
</li>
|
1515
|
+
</ul>
|
1516
|
+
<p><strong>Quick Example</strong></p>
|
1517
|
+
|
1518
|
+
<pre class="prettyprint"><code>function success(entry) {
|
1519
|
+
console.log("Removal succeeded");
|
1520
|
+
}
|
1521
|
+
|
1522
|
+
function fail(error) {
|
1523
|
+
alert('Error removing directory: ' + error.code);
|
1524
|
+
}
|
1525
|
+
|
1526
|
+
// remove this directory
|
1527
|
+
entry.remove(success, fail);
|
1528
|
+
</code></pre>
|
1529
|
+
|
1530
|
+
<h2>
|
1531
|
+
<a name="DirectoryEntry_getparent">getParent</a>
|
1532
|
+
</h2>
|
1533
|
+
|
1534
|
+
<p>Look up the parent <a href="cordova_file_file.md.html#DirectoryEntry">DirectoryEntry</a> containing the directory.</p>
|
1535
|
+
|
1536
|
+
<p><strong>Parameters:</strong></p>
|
1537
|
+
|
1538
|
+
<ul>
|
1539
|
+
<li>
|
1540
|
+
<strong>successCallback</strong> - A callback that is called with the directory's parent <a href="cordova_file_file.md.html#DirectoryEntry">DirectoryEntry</a>. <em>(Function)</em>
|
1541
|
+
</li>
|
1542
|
+
<li>
|
1543
|
+
<strong>errorCallback</strong> - A callback that is called if an error occurs when attempting to retrieve the parent <a href="cordova_file_file.md.html#DirectoryEntry">DirectoryEntry</a>. Invoked with a <a href="cordova_file_file.md.html#FileError">FileError</a> object. <em>(Function)</em>
|
1544
|
+
</li>
|
1545
|
+
</ul>
|
1546
|
+
<p><strong>Quick Example</strong></p>
|
1547
|
+
|
1548
|
+
<pre class="prettyprint"><code>function success(parent) {
|
1549
|
+
console.log("Parent Name: " + parent.name);
|
1550
|
+
}
|
1551
|
+
|
1552
|
+
function fail(error) {
|
1553
|
+
alert('Failed to get parent directory: ' + error.code);
|
1554
|
+
}
|
1555
|
+
|
1556
|
+
// Get the parent <a href="cordova_file_file.md.html#DirectoryEntry">DirectoryEntry</a>
|
1557
|
+
entry.getParent(success, fail);
|
1558
|
+
</code></pre>
|
1559
|
+
|
1560
|
+
<h2>
|
1561
|
+
<a name="DirectoryEntry_createreader">createReader</a>
|
1562
|
+
</h2>
|
1563
|
+
|
1564
|
+
<p>Creates a new <a href="cordova_file_file.md.html#DirectoryReader">DirectoryReader</a> to read entries in a directory.</p>
|
1565
|
+
|
1566
|
+
<p><strong>Quick Example</strong></p>
|
1567
|
+
|
1568
|
+
<pre class="prettyprint"><code>// create a directory reader
|
1569
|
+
var directoryReader = entry.createReader();
|
1570
|
+
</code></pre>
|
1571
|
+
|
1572
|
+
<h2>
|
1573
|
+
<a name="DirectoryEntry_getdirectory">getDirectory</a>
|
1574
|
+
</h2>
|
1575
|
+
|
1576
|
+
<p>Creates or looks up an existing directory. It is an error to attempt to:</p>
|
1577
|
+
|
1578
|
+
<ul>
|
1579
|
+
<li>create a directory whose immediate parent does not yet exist.</li>
|
1580
|
+
</ul>
|
1581
|
+
<p><strong>Parameters:</strong></p>
|
1582
|
+
|
1583
|
+
<ul>
|
1584
|
+
<li>
|
1585
|
+
<strong>path</strong> - The path to the directory to be looked up or created. Either an absolute path, or a relative path from this <a href="cordova_file_file.md.html#DirectoryEntry">DirectoryEntry</a>. <em>(DOMString)</em>
|
1586
|
+
</li>
|
1587
|
+
<li>
|
1588
|
+
<strong>options</strong> - Options to specify whether the directory is created if it doesn't exist. <em>(<a href="cordova_file_file.md.html#Flags">Flags</a>)</em>
|
1589
|
+
</li>
|
1590
|
+
<li>
|
1591
|
+
<strong>successCallback</strong> - A callback that is invoked with a <a href="cordova_file_file.md.html#DirectoryEntry">DirectoryEntry</a> object. <em>(Function)</em>
|
1592
|
+
</li>
|
1593
|
+
<li>
|
1594
|
+
<strong>errorCallback</strong> - A callback that is called if an error occurs creating or looking up the directory. Invoked with a <a href="cordova_file_file.md.html#FileError">FileError</a> object. <em>(Function)</em>
|
1595
|
+
</li>
|
1596
|
+
</ul>
|
1597
|
+
<p><strong>Quick Example</strong></p>
|
1598
|
+
|
1599
|
+
<pre class="prettyprint"><code>function success(parent) {
|
1600
|
+
console.log("Parent Name: " + parent.name);
|
1601
|
+
}
|
1602
|
+
|
1603
|
+
function fail(error) {
|
1604
|
+
alert("Unable to create new directory: " + error.code);
|
1605
|
+
}
|
1606
|
+
|
1607
|
+
// Retrieve an existing directory, or create it if it does not already exist
|
1608
|
+
entry.getDirectory("newDir", {create: true, exclusive: false}, success, fail);
|
1609
|
+
</code></pre>
|
1610
|
+
|
1611
|
+
<h2>
|
1612
|
+
<a name="DirectoryEntry_getfile">getFile</a>
|
1613
|
+
</h2>
|
1614
|
+
|
1615
|
+
<p>Creates or looks up a file. It is an error to attempt to:</p>
|
1616
|
+
|
1617
|
+
<ul>
|
1618
|
+
<li>create a file whose immediate parent does not yet exist.</li>
|
1619
|
+
</ul>
|
1620
|
+
<p><strong>Parameters:</strong></p>
|
1621
|
+
|
1622
|
+
<ul>
|
1623
|
+
<li>
|
1624
|
+
<strong>path</strong> - The path to the file to be looked up or created. Either an absolute path, or a relative path from this <a href="cordova_file_file.md.html#DirectoryEntry">DirectoryEntry</a>. <em>(DOMString)</em>
|
1625
|
+
</li>
|
1626
|
+
<li>
|
1627
|
+
<strong>options</strong> - Options to specify whether the file is created if it doesn't exist. <em>(<a href="cordova_file_file.md.html#Flags">Flags</a>)</em>
|
1628
|
+
</li>
|
1629
|
+
<li>
|
1630
|
+
<strong>successCallback</strong> - A callback that is invoked with a <a href="cordova_file_file.md.html#FileEntry">FileEntry</a> object. <em>(Function)</em>
|
1631
|
+
</li>
|
1632
|
+
<li>
|
1633
|
+
<strong>errorCallback</strong> - A callback that is called if an error occurs creating or looking up the file. Invoked with a <a href="cordova_file_file.md.html#FileError">FileError</a> object. <em>(Function)</em>
|
1634
|
+
</li>
|
1635
|
+
</ul>
|
1636
|
+
<p><strong>Quick Example</strong></p>
|
1637
|
+
|
1638
|
+
<pre class="prettyprint"><code>function success(parent) {
|
1639
|
+
console.log("Parent Name: " + parent.name);
|
1640
|
+
}
|
1641
|
+
|
1642
|
+
function fail(error) {
|
1643
|
+
alert("Failed to retrieve file: " + error.code);
|
1644
|
+
}
|
1645
|
+
|
1646
|
+
// Retrieve an existing file, or create it if it does not exist
|
1647
|
+
entry.getFile("newFile.txt", {create: true, exclusive: false}, success, fail);
|
1648
|
+
</code></pre>
|
1649
|
+
|
1650
|
+
<h2>
|
1651
|
+
<a name="DirectoryEntry_removerecursively">removeRecursively</a>
|
1652
|
+
</h2>
|
1653
|
+
|
1654
|
+
<p>Deletes a directory and all of its contents. In the event of an error (e.g. trying to delete
|
1655
|
+
a directory that contains a file that cannot be removed), some of the contents of the directory may
|
1656
|
+
be deleted. It is an error to attempt to:</p>
|
1657
|
+
|
1658
|
+
<ul>
|
1659
|
+
<li>delete the root directory of a filesystem.</li>
|
1660
|
+
</ul>
|
1661
|
+
<p><strong>Parameters:</strong></p>
|
1662
|
+
|
1663
|
+
<ul>
|
1664
|
+
<li>
|
1665
|
+
<strong>successCallback</strong> - A callback that is called after the <a href="cordova_file_file.md.html#DirectoryEntry">DirectoryEntry</a> has been deleted. Invoked with no parameters. <em>(Function)</em>
|
1666
|
+
</li>
|
1667
|
+
<li>
|
1668
|
+
<strong>errorCallback</strong> - A callback that is called if an error occurs when attempting to delete the <a href="cordova_file_file.md.html#DirectoryEntry">DirectoryEntry</a>. Invoked with a <a href="cordova_file_file.md.html#FileError">FileError</a> object. <em>(Function)</em>
|
1669
|
+
</li>
|
1670
|
+
</ul>
|
1671
|
+
<p><strong>Quick Example</strong></p>
|
1672
|
+
|
1673
|
+
<pre class="prettyprint"><code>function success(parent) {
|
1674
|
+
console.log("Remove Recursively Succeeded");
|
1675
|
+
}
|
1676
|
+
|
1677
|
+
function fail(error) {
|
1678
|
+
alert("Failed to remove directory or it's contents: " + error.code);
|
1679
|
+
}
|
1680
|
+
|
1681
|
+
// remove the directory and all it's contents
|
1682
|
+
entry.removeRecursively(success, fail);
|
1683
|
+
</code></pre>
|
1684
|
+
|
1685
|
+
<hr>
|
1686
|
+
<h1><a name="DirectoryReader">DirectoryReader</a></h1>
|
1687
|
+
|
1688
|
+
<p>An object that lists files and directories in a directory. Defined in the <a class="external" href="http://www.w3.org/TR/file-system-api/">Directories and Systems</a> specification.</p>
|
1689
|
+
|
1690
|
+
<h2>
|
1691
|
+
<a name="DirectoryReader_methods">Methods</a>
|
1692
|
+
</h2>
|
1693
|
+
|
1694
|
+
<ul>
|
1695
|
+
<li>
|
1696
|
+
<strong>readEntries</strong>: Read the entries in a directory. </li>
|
1697
|
+
</ul>
|
1698
|
+
<h2>
|
1699
|
+
<a name="DirectoryReader_supported_platforms">Supported Platforms</a>
|
1700
|
+
</h2>
|
1701
|
+
|
1702
|
+
<ul>
|
1703
|
+
<li>Android</li>
|
1704
|
+
<li>BlackBerry WebWorks (OS 5.0 and higher)</li>
|
1705
|
+
<li>iOS</li>
|
1706
|
+
<li>Windows Phone 7 ( Mango )</li>
|
1707
|
+
</ul>
|
1708
|
+
<h2>
|
1709
|
+
<a name="DirectoryReader_readentries">readEntries</a>
|
1710
|
+
</h2>
|
1711
|
+
|
1712
|
+
<p>Read the entries in this directory.</p>
|
1713
|
+
|
1714
|
+
<p><strong>Parameters:</strong></p>
|
1715
|
+
|
1716
|
+
<ul>
|
1717
|
+
<li>
|
1718
|
+
<strong>successCallback</strong> - A callback that is passed an array of <a href="cordova_file_file.md.html#FileEntry">FileEntry</a> and <a href="cordova_file_file.md.html#DirectoryEntry">DirectoryEntry</a> objects. <em>(Function)</em>
|
1719
|
+
</li>
|
1720
|
+
<li>
|
1721
|
+
<strong>errorCallback</strong> - A callback that is called if an error occurs retrieving the directory listing. Invoked with a <a href="cordova_file_file.md.html#FileError">FileError</a> object. <em>(Function)</em>
|
1722
|
+
</li>
|
1723
|
+
</ul>
|
1724
|
+
<p><strong>Quick Example</strong></p>
|
1725
|
+
|
1726
|
+
<pre class="prettyprint"><code>function success(entries) {
|
1727
|
+
var i;
|
1728
|
+
for (i=0; i<entries.length; i++) {
|
1729
|
+
console.log(entries[i].name);
|
1730
|
+
}
|
1731
|
+
}
|
1732
|
+
|
1733
|
+
function fail(error) {
|
1734
|
+
alert("Failed to list directory contents: " + error.code);
|
1735
|
+
}
|
1736
|
+
|
1737
|
+
// Get a directory reader
|
1738
|
+
var directoryReader = dirEntry.createReader();
|
1739
|
+
|
1740
|
+
// Get a list of all the entries in the directory
|
1741
|
+
directoryReader.readEntries(success,fail);
|
1742
|
+
</code></pre>
|
1743
|
+
|
1744
|
+
<hr>
|
1745
|
+
<h1><a name="FileTransfer">FileTransfer</a></h1>
|
1746
|
+
|
1747
|
+
<p><a href="cordova_file_file.md.html#FileTransfer">FileTransfer</a> is an object that allows you to upload files to a server or download files from a server.</p>
|
1748
|
+
|
1749
|
+
<h2>
|
1750
|
+
<a name="FileTransfer_properties">Properties</a>
|
1751
|
+
</h2>
|
1752
|
+
|
1753
|
+
<p>N/A</p>
|
1754
|
+
|
1755
|
+
<h2>
|
1756
|
+
<a name="FileTransfer_methods">Methods</a>
|
1757
|
+
</h2>
|
1758
|
+
|
1759
|
+
<ul>
|
1760
|
+
<li>
|
1761
|
+
<strong>upload</strong>: sends a file to a server. </li>
|
1762
|
+
<li>
|
1763
|
+
<strong>download</strong>: downloads a file from server.</li>
|
1764
|
+
</ul>
|
1765
|
+
<h2>
|
1766
|
+
<a name="FileTransfer_details">Details</a>
|
1767
|
+
</h2>
|
1768
|
+
|
1769
|
+
<p>The <code><a href="cordova_file_file.md.html#FileTransfer">FileTransfer</a></code> object provides a way to upload files to a remote server using an HTTP multi-part POST request. Both HTTP and HTTPS protocols are supported. Optional parameters can be specified by passing a <a href="cordova_file_file.md.html#FileUploadOptions">FileUploadOptions</a> object to the upload method. On successful upload, the success callback will be called with a <a href="cordova_file_file.md.html#FileUploadResult">FileUploadResult</a> object. If an error occurs, the error callback will be invoked with a <a href="cordova_file_file.md.html#FileTransferError">FileTransferError</a> object.
|
1770
|
+
It is also possible to download a file from remote and save it on the device (only iOS and Android).</p>
|
1771
|
+
|
1772
|
+
<h2>
|
1773
|
+
<a name="FileTransfer_supported_platforms">Supported Platforms</a>
|
1774
|
+
</h2>
|
1775
|
+
|
1776
|
+
<ul>
|
1777
|
+
<li>Android</li>
|
1778
|
+
<li>BlackBerry WebWorks (OS 5.0 and higher)</li>
|
1779
|
+
<li>iOS</li>
|
1780
|
+
<li>Windows Phone 7 ( Mango )</li>
|
1781
|
+
</ul>
|
1782
|
+
<h2>
|
1783
|
+
<a name="FileTransfer_upload">upload</a>
|
1784
|
+
</h2>
|
1785
|
+
|
1786
|
+
<p><strong>Parameters:</strong></p>
|
1787
|
+
|
1788
|
+
<ul>
|
1789
|
+
<li>
|
1790
|
+
<strong>filePath</strong> - Full path of the file on the device</li>
|
1791
|
+
<li>
|
1792
|
+
<strong>server</strong> - URL of the server to receive the file (must already be encoded using encodeURI())</li>
|
1793
|
+
<li>
|
1794
|
+
<strong>successCallback</strong> - A callback that is called with a <a href="cordova_file_file.md.html#Metadata">Metadata</a> object. <em>(Function)</em>
|
1795
|
+
</li>
|
1796
|
+
<li>
|
1797
|
+
<strong>errorCallback</strong> - A callback that is called if an error occurs retrieving the <a href="cordova_file_file.md.html#Metadata">Metadata</a>. Invoked with a <a href="cordova_file_file.md.html#FileError">FileError</a> object. <em>(Function)</em>
|
1798
|
+
</li>
|
1799
|
+
<li>
|
1800
|
+
<strong>options</strong> - Optional parameters such as file name and mimetype</li>
|
1801
|
+
</ul>
|
1802
|
+
<p><strong>Quick Example</strong></p>
|
1803
|
+
|
1804
|
+
<pre class="prettyprint"><code>// !! Assumes variable fileURI contains a valid URI to a text file on the device
|
1805
|
+
|
1806
|
+
var win = function(r) {
|
1807
|
+
console.log("Code = " + r.responseCode);
|
1808
|
+
console.log("Response = " + r.response);
|
1809
|
+
console.log("Sent = " + r.bytesSent);
|
1810
|
+
}
|
1811
|
+
|
1812
|
+
var fail = function(error) {
|
1813
|
+
alert("An error has occurred: Code = " + error.code);
|
1814
|
+
console.log("upload error source " + error.source);
|
1815
|
+
console.log("upload error target " + error.target);
|
1816
|
+
}
|
1817
|
+
|
1818
|
+
var options = new <a href="cordova_file_file.md.html#FileUploadOptions">FileUploadOptions</a>();
|
1819
|
+
options.fileKey="file";
|
1820
|
+
options.fileName=fileURI.substr(fileURI.lastIndexOf('/')+1);
|
1821
|
+
options.mimeType="text/plain";
|
1822
|
+
|
1823
|
+
var params = new Object();
|
1824
|
+
params.value1 = "test";
|
1825
|
+
params.value2 = "param";
|
1826
|
+
|
1827
|
+
options.params = params;
|
1828
|
+
|
1829
|
+
var ft = new <a href="cordova_file_file.md.html#FileTransfer">FileTransfer</a>();
|
1830
|
+
ft.upload(fileURI, encodeURI("http://some.server.com/upload.php"), win, fail, options);
|
1831
|
+
</code></pre>
|
1832
|
+
|
1833
|
+
<p><strong>Full Example</strong></p>
|
1834
|
+
|
1835
|
+
<pre class="prettyprint"><code><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
1836
|
+
<html>
|
1837
|
+
<head>
|
1838
|
+
<title><a href="cordova_file_file.md.html#File">File</a> Transfer Example</title>
|
1839
|
+
|
1840
|
+
<script type="text/javascript" charset="utf-8" src="cordova-2.0.0.js"></script>
|
1841
|
+
<script type="text/javascript" charset="utf-8">
|
1842
|
+
|
1843
|
+
// Wait for Cordova to load
|
1844
|
+
//
|
1845
|
+
document.addEventListener("<a href="cordova_events_events.md.html#deviceready">deviceready</a>", onDeviceReady, false);
|
1846
|
+
|
1847
|
+
// Cordova is ready
|
1848
|
+
//
|
1849
|
+
function onDeviceReady() {
|
1850
|
+
|
1851
|
+
// Retrieve image file location from specified source
|
1852
|
+
navigator.<a href="cordova_camera_camera.md.html#camera.getPicture">camera.getPicture</a>(uploadPhoto,
|
1853
|
+
function(message) { alert('get picture failed'); },
|
1854
|
+
{ quality: 50,
|
1855
|
+
destinationType: navigator.camera.DestinationType.FILE_URI,
|
1856
|
+
sourceType: navigator.camera.PictureSourceType.PHOTOLIBRARY }
|
1857
|
+
);
|
1858
|
+
|
1859
|
+
}
|
1860
|
+
|
1861
|
+
function uploadPhoto(imageURI) {
|
1862
|
+
var options = new <a href="cordova_file_file.md.html#FileUploadOptions">FileUploadOptions</a>();
|
1863
|
+
options.fileKey="file";
|
1864
|
+
options.fileName=imageURI.substr(imageURI.lastIndexOf('/')+1);
|
1865
|
+
options.mimeType="image/jpeg";
|
1866
|
+
|
1867
|
+
var params = new Object();
|
1868
|
+
params.value1 = "test";
|
1869
|
+
params.value2 = "param";
|
1870
|
+
|
1871
|
+
options.params = params;
|
1872
|
+
|
1873
|
+
var ft = new <a href="cordova_file_file.md.html#FileTransfer">FileTransfer</a>();
|
1874
|
+
ft.upload(imageURI, encodeURI("http://some.server.com/upload.php"), win, fail, options);
|
1875
|
+
}
|
1876
|
+
|
1877
|
+
function win(r) {
|
1878
|
+
console.log("Code = " + r.responseCode);
|
1879
|
+
console.log("Response = " + r.response);
|
1880
|
+
console.log("Sent = " + r.bytesSent);
|
1881
|
+
}
|
1882
|
+
|
1883
|
+
function fail(error) {
|
1884
|
+
alert("An error has occurred: Code = " + error.code);
|
1885
|
+
console.log("upload error source " + error.source);
|
1886
|
+
console.log("upload error target " + error.target);
|
1887
|
+
}
|
1888
|
+
|
1889
|
+
</script>
|
1890
|
+
</head>
|
1891
|
+
<body>
|
1892
|
+
<h1>Example</h1>
|
1893
|
+
<p>Upload <a href="cordova_file_file.md.html#File">File</a></p>
|
1894
|
+
</body>
|
1895
|
+
</html>
|
1896
|
+
</code></pre>
|
1897
|
+
|
1898
|
+
<h2>
|
1899
|
+
<a name="FileTransfer_ios_quirks">iOS Quirks</a>
|
1900
|
+
</h2>
|
1901
|
+
|
1902
|
+
<p>Setting headers for <a href="cordova_file_file.md.html#FileTransfer">FileTransfer</a> Upload:</p>
|
1903
|
+
|
1904
|
+
<p><strong>Quick Example</strong></p>
|
1905
|
+
|
1906
|
+
<pre class="prettyprint"><code>function win(r) {
|
1907
|
+
console.log("Code = " + r.responseCode);
|
1908
|
+
console.log("Response = " + r.response);
|
1909
|
+
console.log("Sent = " + r.bytesSent);
|
1910
|
+
}
|
1911
|
+
|
1912
|
+
function fail(error) {
|
1913
|
+
alert("An error has occurred: Code = " + error.code);
|
1914
|
+
console.log("upload error source " + error.source);
|
1915
|
+
console.log("upload error target " + error.target);
|
1916
|
+
}
|
1917
|
+
|
1918
|
+
var uri = encodeURI("http://some.server.com/upload.php");
|
1919
|
+
|
1920
|
+
var options = new <a href="cordova_file_file.md.html#FileUploadOptions">FileUploadOptions</a>();
|
1921
|
+
options.fileKey="file";
|
1922
|
+
options.fileName=fileURI.substr(fileURI.lastIndexOf('/')+1);
|
1923
|
+
options.mimeType="text/plain";
|
1924
|
+
|
1925
|
+
var params = new Object();
|
1926
|
+
params.headers={'headerParam':'headerValue'};
|
1927
|
+
|
1928
|
+
options.params = params;
|
1929
|
+
|
1930
|
+
var ft = new <a href="cordova_file_file.md.html#FileTransfer">FileTransfer</a>();
|
1931
|
+
ft.upload(fileURI, uri, win, fail, options);
|
1932
|
+
</code></pre>
|
1933
|
+
|
1934
|
+
<h2>
|
1935
|
+
<a name="FileTransfer_download">download</a>
|
1936
|
+
</h2>
|
1937
|
+
|
1938
|
+
<p><strong>Parameters:</strong></p>
|
1939
|
+
|
1940
|
+
<ul>
|
1941
|
+
<li>
|
1942
|
+
<strong>source</strong> - URL of the server to download the file (must already be encoded using encodeURI())</li>
|
1943
|
+
<li>
|
1944
|
+
<strong>target</strong> - Full path of the file on the device</li>
|
1945
|
+
<li>
|
1946
|
+
<strong>successCallback</strong> - A callback that is called with a <a href="cordova_file_file.md.html#FileEntry">FileEntry</a> object. <em>(Function)</em>
|
1947
|
+
</li>
|
1948
|
+
<li>
|
1949
|
+
<strong>errorCallback</strong> - A callback that is called if an error occurs retrieving the <a href="cordova_file_file.md.html#Metadata">Metadata</a>. Invoked with a <a href="cordova_file_file.md.html#FileError">FileError</a> object. <em>(Function)</em>
|
1950
|
+
</li>
|
1951
|
+
</ul>
|
1952
|
+
<p><strong>Quick Example</strong></p>
|
1953
|
+
|
1954
|
+
<pre class="prettyprint"><code> // !! Assumes variable url contains a valid URI to a file on a server and filePath is a valid path on the device
|
1955
|
+
|
1956
|
+
var fileTransfer = new <a href="cordova_file_file.md.html#FileTransfer">FileTransfer</a>();
|
1957
|
+
var uri = encodeURI("http://some.server.com/download.php");
|
1958
|
+
|
1959
|
+
fileTransfer.download(
|
1960
|
+
uri,
|
1961
|
+
filePath,
|
1962
|
+
function(entry) {
|
1963
|
+
console.log("download complete: " + entry.fullPath);
|
1964
|
+
},
|
1965
|
+
function(error) {
|
1966
|
+
console.log("download error source " + error.source);
|
1967
|
+
console.log("download error target " + error.target);
|
1968
|
+
console.log("upload error code" + error.code);
|
1969
|
+
}
|
1970
|
+
);
|
1971
|
+
</code></pre>
|
1972
|
+
|
1973
|
+
<hr>
|
1974
|
+
<h1><a name="FileUploadOptions">FileUploadOptions</a></h1>
|
1975
|
+
|
1976
|
+
<p>A <code><a href="cordova_file_file.md.html#FileUploadOptions">FileUploadOptions</a></code> object can be passed to the <a href="cordova_file_file.md.html#FileTransfer">FileTransfer</a> objects upload method in order to specify additional parameters to the upload script.</p>
|
1977
|
+
|
1978
|
+
<h2>
|
1979
|
+
<a name="FileUploadOptions_properties">Properties</a>
|
1980
|
+
</h2>
|
1981
|
+
|
1982
|
+
<ul>
|
1983
|
+
<li>
|
1984
|
+
<strong>fileKey:</strong> The name of the form element. If not set defaults to "file". (DOMString)</li>
|
1985
|
+
<li>
|
1986
|
+
<strong>fileName:</strong> The file name you want the file to be saved as on the server. If not set defaults to "image.jpg". (DOMString)</li>
|
1987
|
+
<li>
|
1988
|
+
<strong>mimeType:</strong> The mime type of the data you are uploading. If not set defaults to "image/jpeg". (DOMString)</li>
|
1989
|
+
<li>
|
1990
|
+
<strong>params:</strong> A set of optional key/value pairs to be passed along in the HTTP request. (Object)</li>
|
1991
|
+
<li>
|
1992
|
+
<strong>chunkedMode:</strong> Should the data be uploaded in chunked streaming mode. If not set defaults to "true". (Boolean)</li>
|
1993
|
+
</ul>
|
1994
|
+
<h2>
|
1995
|
+
<a name="FileUploadOptions_description">Description</a>
|
1996
|
+
</h2>
|
1997
|
+
|
1998
|
+
<p>A <code><a href="cordova_file_file.md.html#FileUploadOptions">FileUploadOptions</a></code> object can be passed to the <a href="cordova_file_file.md.html#FileTransfer">FileTransfer</a> objects upload method in order to specify additional parameters to the upload script.</p>
|
1999
|
+
|
2000
|
+
<h2>
|
2001
|
+
<a name="FileUploadOptions_wp7_quirk">WP7 Quirk</a>
|
2002
|
+
</h2>
|
2003
|
+
|
2004
|
+
<ul>
|
2005
|
+
<li>
|
2006
|
+
<strong>chunkedMode:</strong>
|
2007
|
+
This parameter is ignored on WP7.</li>
|
2008
|
+
</ul>
|
2009
|
+
<hr>
|
2010
|
+
<h1><a name="FileUploadResult">FileUploadResult</a></h1>
|
2011
|
+
|
2012
|
+
<p>A <code><a href="cordova_file_file.md.html#FileUploadResult">FileUploadResult</a></code> object is returned via the success callback of the <a href="cordova_file_file.md.html#FileTransfer">FileTransfer</a> upload method.</p>
|
2013
|
+
|
2014
|
+
<h2>
|
2015
|
+
<a name="FileUploadResult_properties">Properties</a>
|
2016
|
+
</h2>
|
2017
|
+
|
2018
|
+
<ul>
|
2019
|
+
<li>
|
2020
|
+
<strong>bytesSent:</strong> The number of bytes sent to the server as part of the upload. (long)</li>
|
2021
|
+
<li>
|
2022
|
+
<strong>responseCode:</strong> The HTTP response code returned by the server. (long)</li>
|
2023
|
+
<li>
|
2024
|
+
<strong>response:</strong> The HTTP response returned by the server. (DOMString)</li>
|
2025
|
+
</ul>
|
2026
|
+
<h2>
|
2027
|
+
<a name="FileUploadResult_description">Description</a>
|
2028
|
+
</h2>
|
2029
|
+
|
2030
|
+
<p>The <code><a href="cordova_file_file.md.html#FileUploadResult">FileUploadResult</a></code> object is returned via the success callback of the <a href="cordova_file_file.md.html#FileTransfer">FileTransfer</a> upload method.</p>
|
2031
|
+
|
2032
|
+
<h2>
|
2033
|
+
<a name="FileUploadResult_ios_quirks">iOS Quirks</a>
|
2034
|
+
</h2>
|
2035
|
+
|
2036
|
+
<ul>
|
2037
|
+
<li>iOS does not include values for responseCode nor bytesSent in the success callback <a href="cordova_file_file.md.html#FileUploadResult">FileUploadResult</a> object.</li>
|
2038
|
+
</ul>
|
2039
|
+
<hr>
|
2040
|
+
<h1><a name="Flags">Flags</a></h1>
|
2041
|
+
|
2042
|
+
<p>This object is used to supply arguments to the <code><a href="cordova_file_file.md.html#DirectoryEntry">DirectoryEntry</a></code> <strong>getFile</strong> and <strong>getDirectory</strong> methods, which look up or create files and directories, respectively.</p>
|
2043
|
+
|
2044
|
+
<h2>
|
2045
|
+
<a name="Flags_properties">Properties</a>
|
2046
|
+
</h2>
|
2047
|
+
|
2048
|
+
<ul>
|
2049
|
+
<li>
|
2050
|
+
<strong>create:</strong> Used to indicate that the file or directory should be created, if it does not exist. <em>(boolean)</em>
|
2051
|
+
</li>
|
2052
|
+
<li>
|
2053
|
+
<strong>exclusive:</strong> By itself, exclusive has no effect. Used with create, it causes the file or directory creation to fail if the target path already exists. <em>(boolean)</em>
|
2054
|
+
</li>
|
2055
|
+
</ul>
|
2056
|
+
<h2>
|
2057
|
+
<a name="Flags_supported_platforms">Supported Platforms</a>
|
2058
|
+
</h2>
|
2059
|
+
|
2060
|
+
<ul>
|
2061
|
+
<li>Android</li>
|
2062
|
+
<li>BlackBerry WebWorks (OS 5.0 and higher)</li>
|
2063
|
+
<li>iOS</li>
|
2064
|
+
<li>Windows Phone 7 ( Mango )</li>
|
2065
|
+
</ul>
|
2066
|
+
<h2>
|
2067
|
+
<a name="Flags_quick_example">Quick Example</a>
|
2068
|
+
</h2>
|
2069
|
+
|
2070
|
+
<pre class="prettyprint"><code>// Get the data directory, creating it if it doesn't exist.
|
2071
|
+
dataDir = fileSystem.root.getDirectory("data", {create: true});
|
2072
|
+
|
2073
|
+
// Create the lock file, if and only if it doesn't exist.
|
2074
|
+
lockFile = dataDir.getFile("lockfile.txt", {create: true, exclusive: true});
|
2075
|
+
</code></pre>
|
2076
|
+
|
2077
|
+
<hr>
|
2078
|
+
<h1><a name="LocalFileSystem">LocalFileSystem</a></h1>
|
2079
|
+
|
2080
|
+
<p>This object provides a way to obtain root file systems.</p>
|
2081
|
+
|
2082
|
+
<h2>
|
2083
|
+
<a name="LocalFileSystem_methods">Methods</a>
|
2084
|
+
</h2>
|
2085
|
+
|
2086
|
+
<ul>
|
2087
|
+
<li>
|
2088
|
+
<strong>requestFileSystem:</strong> Requests a filesystem. <em>(Function)</em>
|
2089
|
+
</li>
|
2090
|
+
<li>
|
2091
|
+
<strong>resolveLocalFileSystemURI:</strong> Retrieve a <a href="cordova_file_file.md.html#DirectoryEntry">DirectoryEntry</a> or <a href="cordova_file_file.md.html#FileEntry">FileEntry</a> using local URI. <em>(Function)</em>
|
2092
|
+
</li>
|
2093
|
+
</ul>
|
2094
|
+
<h2>
|
2095
|
+
<a name="LocalFileSystem_constants">Constants</a>
|
2096
|
+
</h2>
|
2097
|
+
|
2098
|
+
<ul>
|
2099
|
+
<li>
|
2100
|
+
<code><a href="cordova_file_file.md.html#LocalFileSystem">LocalFileSystem</a>.PERSISTENT</code>: Used for storage that should not be removed by the user agent without application or user permission.</li>
|
2101
|
+
<li>
|
2102
|
+
<code><a href="cordova_file_file.md.html#LocalFileSystem">LocalFileSystem</a>.TEMPORARY</code>: Used for storage with no guarantee of persistence.</li>
|
2103
|
+
</ul>
|
2104
|
+
<h2>
|
2105
|
+
<a name="LocalFileSystem_details">Details</a>
|
2106
|
+
</h2>
|
2107
|
+
|
2108
|
+
<p>The <code><a href="cordova_file_file.md.html#LocalFileSystem">LocalFileSystem</a></code> object methods are defined on the <strong>window</strong> object.</p>
|
2109
|
+
|
2110
|
+
<h2>
|
2111
|
+
<a name="LocalFileSystem_supported_platforms">Supported Platforms</a>
|
2112
|
+
</h2>
|
2113
|
+
|
2114
|
+
<ul>
|
2115
|
+
<li>Android</li>
|
2116
|
+
<li>BlackBerry WebWorks (OS 5.0 and higher)</li>
|
2117
|
+
<li>iOS</li>
|
2118
|
+
<li>Windows Phone 7 ( Mango )</li>
|
2119
|
+
</ul>
|
2120
|
+
<h2>
|
2121
|
+
<a name="LocalFileSystem_request_file_system_quick_example">Request File System Quick Example</a>
|
2122
|
+
</h2>
|
2123
|
+
|
2124
|
+
<pre class="prettyprint"><code>function onSuccess(fileSystem) {
|
2125
|
+
console.log(fileSystem.name);
|
2126
|
+
}
|
2127
|
+
|
2128
|
+
// request the persistent file system
|
2129
|
+
window.requestFileSystem(<a href="cordova_file_file.md.html#LocalFileSystem">LocalFileSystem</a>.PERSISTENT, 0, onSuccess, onError);
|
2130
|
+
</code></pre>
|
2131
|
+
|
2132
|
+
<h2>
|
2133
|
+
<a name="LocalFileSystem_resolve_local_file_system_uri_quick_example">Resolve Local File System URI Quick Example</a>
|
2134
|
+
</h2>
|
2135
|
+
|
2136
|
+
<pre class="prettyprint"><code>function onSuccess(fileEntry) {
|
2137
|
+
console.log(fileEntry.name);
|
2138
|
+
}
|
2139
|
+
|
2140
|
+
window.resolveLocalFileSystemURI("file:///example.txt", onSuccess, onError);
|
2141
|
+
</code></pre>
|
2142
|
+
|
2143
|
+
<h2>
|
2144
|
+
<a name="LocalFileSystem_full_example">Full Example</a>
|
2145
|
+
</h2>
|
2146
|
+
|
2147
|
+
<pre class="prettyprint"><code><!DOCTYPE html>
|
2148
|
+
<html>
|
2149
|
+
<head>
|
2150
|
+
<title>Local <a href="cordova_file_file.md.html#File">File</a> System Example</title>
|
2151
|
+
|
2152
|
+
<script type="text/javascript" charset="utf-8" src="cordova-2.0.0.js"></script>
|
2153
|
+
<script type="text/javascript" charset="utf-8">
|
2154
|
+
|
2155
|
+
// Wait for Cordova to load
|
2156
|
+
//
|
2157
|
+
document.addEventListener("<a href="cordova_events_events.md.html#deviceready">deviceready</a>", onDeviceReady, false);
|
2158
|
+
|
2159
|
+
// Cordova is ready
|
2160
|
+
//
|
2161
|
+
function onDeviceReady() {
|
2162
|
+
window.requestFileSystem(<a href="cordova_file_file.md.html#LocalFileSystem">LocalFileSystem</a>.PERSISTENT, 0, onFileSystemSuccess, fail);
|
2163
|
+
window.resolveLocalFileSystemURI("file:///example.txt", onResolveSuccess, fail);
|
2164
|
+
}
|
2165
|
+
|
2166
|
+
function onFileSystemSuccess(fileSystem) {
|
2167
|
+
console.log(fileSystem.name);
|
2168
|
+
}
|
2169
|
+
|
2170
|
+
function onResolveSuccess(fileEntry) {
|
2171
|
+
console.log(fileEntry.name);
|
2172
|
+
}
|
2173
|
+
|
2174
|
+
function fail(evt) {
|
2175
|
+
console.log(evt.target.error.code);
|
2176
|
+
}
|
2177
|
+
|
2178
|
+
</script>
|
2179
|
+
</head>
|
2180
|
+
<body>
|
2181
|
+
<h1>Example</h1>
|
2182
|
+
<p>Local <a href="cordova_file_file.md.html#File">File</a> System</p>
|
2183
|
+
</body>
|
2184
|
+
</html>
|
2185
|
+
</code></pre>
|
2186
|
+
|
2187
|
+
<hr>
|
2188
|
+
<h1><a name="Metadata">Metadata</a></h1>
|
2189
|
+
|
2190
|
+
<p>This interface supplies information about the state of a file or directory.</p>
|
2191
|
+
|
2192
|
+
<h2>
|
2193
|
+
<a name="Metadata_properties">Properties</a>
|
2194
|
+
</h2>
|
2195
|
+
|
2196
|
+
<ul>
|
2197
|
+
<li>
|
2198
|
+
<strong>modificationTime:</strong> This is the time at which the file or directory was last modified. <em>(Date)</em>
|
2199
|
+
</li>
|
2200
|
+
</ul>
|
2201
|
+
<h2>
|
2202
|
+
<a name="Metadata_details">Details</a>
|
2203
|
+
</h2>
|
2204
|
+
|
2205
|
+
<p>The <code><a href="cordova_file_file.md.html#Metadata">Metadata</a></code> object represents information about the state of a file or directory. You can get an instance of a <a href="cordova_file_file.md.html#Metadata">Metadata</a> object by calling the <strong>getMetadata</strong> method of a <code><a href="cordova_file_file.md.html#DirectoryEntry">DirectoryEntry</a></code> or <code><a href="cordova_file_file.md.html#FileEntry">FileEntry</a></code> object.</p>
|
2206
|
+
|
2207
|
+
<h2>
|
2208
|
+
<a name="Metadata_supported_platforms">Supported Platforms</a>
|
2209
|
+
</h2>
|
2210
|
+
|
2211
|
+
<ul>
|
2212
|
+
<li>Android</li>
|
2213
|
+
<li>BlackBerry WebWorks (OS 5.0 and higher)</li>
|
2214
|
+
<li>iOS</li>
|
2215
|
+
<li>Windows Phone 7 ( Mango )</li>
|
2216
|
+
</ul>
|
2217
|
+
<h2>
|
2218
|
+
<a name="Metadata_quick_example">Quick Example</a>
|
2219
|
+
</h2>
|
2220
|
+
|
2221
|
+
<pre class="prettyprint"><code>function win(metadata) {
|
2222
|
+
console.log("Last Modified: " + metadata.modificationTime);
|
2223
|
+
}
|
2224
|
+
|
2225
|
+
// Request the metadata object for this entry
|
2226
|
+
entry.getMetadata(win, null);
|
2227
|
+
</code></pre>
|
2228
|
+
|
2229
|
+
<hr>
|
2230
|
+
<h1><a name="FileError">FileError</a></h1>
|
2231
|
+
|
2232
|
+
<p>A '<a href="cordova_file_file.md.html#FileError">FileError</a>' object is set when an error occurs in any of the <a href="cordova_file_file.md.html#File">File</a> API methods. </p>
|
2233
|
+
|
2234
|
+
<h2>
|
2235
|
+
<a name="FileError_properties">Properties</a>
|
2236
|
+
</h2>
|
2237
|
+
|
2238
|
+
<ul>
|
2239
|
+
<li>
|
2240
|
+
<strong>code:</strong> One of the predefined error codes listed below.</li>
|
2241
|
+
</ul>
|
2242
|
+
<h2>
|
2243
|
+
<a name="FileError_constants">Constants</a>
|
2244
|
+
</h2>
|
2245
|
+
|
2246
|
+
<ul>
|
2247
|
+
<li><code><a href="cordova_file_file.md.html#FileError">FileError</a>.NOT_FOUND_ERR</code></li>
|
2248
|
+
<li><code><a href="cordova_file_file.md.html#FileError">FileError</a>.SECURITY_ERR</code></li>
|
2249
|
+
<li><code><a href="cordova_file_file.md.html#FileError">FileError</a>.ABORT_ERR</code></li>
|
2250
|
+
<li><code><a href="cordova_file_file.md.html#FileError">FileError</a>.NOT_READABLE_ERR</code></li>
|
2251
|
+
<li><code><a href="cordova_file_file.md.html#FileError">FileError</a>.ENCODING_ERR</code></li>
|
2252
|
+
<li><code><a href="cordova_file_file.md.html#FileError">FileError</a>.NO_MODIFICATION_ALLOWED_ERR</code></li>
|
2253
|
+
<li><code><a href="cordova_file_file.md.html#FileError">FileError</a>.INVALID_STATE_ERR</code></li>
|
2254
|
+
<li><code><a href="cordova_file_file.md.html#FileError">FileError</a>.SYNTAX_ERR</code></li>
|
2255
|
+
<li><code><a href="cordova_file_file.md.html#FileError">FileError</a>.INVALID_MODIFICATION_ERR</code></li>
|
2256
|
+
<li><code><a href="cordova_file_file.md.html#FileError">FileError</a>.QUOTA_EXCEEDED_ERR</code></li>
|
2257
|
+
<li><code><a href="cordova_file_file.md.html#FileError">FileError</a>.TYPE_MISMATCH_ERR</code></li>
|
2258
|
+
<li><code><a href="cordova_file_file.md.html#FileError">FileError</a>.PATH_EXISTS_ERR</code></li>
|
2259
|
+
</ul>
|
2260
|
+
<h2>
|
2261
|
+
<a name="FileError_description">Description</a>
|
2262
|
+
</h2>
|
2263
|
+
|
2264
|
+
<p>The <code><a href="cordova_file_file.md.html#FileError">FileError</a></code> object is the only parameter of any of the <a href="cordova_file_file.md.html#File">File</a> API's error callbacks. Developers must read the code property to determine the type of error.</p>
|
2265
|
+
|
2266
|
+
<hr>
|
2267
|
+
<h1><a name="FileTransferError">FileTransferError</a></h1>
|
2268
|
+
|
2269
|
+
<p>A <code><a href="cordova_file_file.md.html#FileTransferError">FileTransferError</a></code> object is returned via the error callback when an error occurs.</p>
|
2270
|
+
|
2271
|
+
<h2>
|
2272
|
+
<a name="FileTransferError_properties">Properties</a>
|
2273
|
+
</h2>
|
2274
|
+
|
2275
|
+
<ul>
|
2276
|
+
<li>
|
2277
|
+
<strong>code</strong> One of the predefined error codes listed below. (Number)</li>
|
2278
|
+
<li>
|
2279
|
+
<strong>source</strong> URI to the source (String)</li>
|
2280
|
+
<li>
|
2281
|
+
<strong>target</strong> URI to the target (String)</li>
|
2282
|
+
<li>
|
2283
|
+
<strong>http_status</strong> HTTP status code. This attribute is only available when a response code is received from the HTTP connection. (Number)</li>
|
2284
|
+
</ul>
|
2285
|
+
<h2>
|
2286
|
+
<a name="FileTransferError_constants">Constants</a>
|
2287
|
+
</h2>
|
2288
|
+
|
2289
|
+
<ul>
|
2290
|
+
<li><code><a href="cordova_file_file.md.html#FileTransferError">FileTransferError</a>.FILE_NOT_FOUND_ERR</code></li>
|
2291
|
+
<li><code><a href="cordova_file_file.md.html#FileTransferError">FileTransferError</a>.INVALID_URL_ERR</code></li>
|
2292
|
+
<li><code><a href="cordova_file_file.md.html#FileTransferError">FileTransferError</a>.CONNECTION_ERR</code></li>
|
2293
|
+
</ul>
|
2294
|
+
<h2>
|
2295
|
+
<a name="FileTransferError_description">Description</a>
|
2296
|
+
</h2>
|
2297
|
+
|
2298
|
+
<p>The <code><a href="cordova_file_file.md.html#FileTransferError">FileTransferError</a></code> object is returned via the error callback when an error occurs when uploading or downloading a file.</p>
|
2299
|
+
|
2300
|
+
</div>
|
2301
|
+
</div>
|
2302
|
+
|
2303
|
+
<!-- Functionality and Syntax Highlighting -->
|
2304
|
+
<script type="text/javascript" src="index.js"></script><script type="text/javascript" src="prettify/prettify.js"></script>
|
2305
|
+
</body>
|
2306
|
+
</html>
|