]> git.proxmox.com Git - sencha-touch.git/blob - src/src/device/FileSystem.js
import Sencha Touch 2.4.2 source
[sencha-touch.git] / src / src / device / FileSystem.js
1 /**
2 * Provides an API to navigate file system hierarchies.
3 *
4 * For more information regarding Native APIs, please review our [Native APIs guide](../../../packaging/native_apis.html).
5 *
6 * @mixins Ext.device.filesystem.Sencha
7 */
8 Ext.define('Ext.device.FileSystem', {
9 singleton: true,
10
11 requires: [
12 'Ext.device.Communicator',
13 'Ext.device.filesystem.Cordova',
14 'Ext.device.filesystem.Chrome',
15 'Ext.device.filesystem.Simulator',
16 'Ext.device.filesystem.Sencha'
17 ],
18
19 constructor: function() {
20 var browserEnv = Ext.browser.is;
21 if (browserEnv.WebView) {
22 if (browserEnv.Cordova) {
23 return Ext.create('Ext.device.filesystem.Cordova');
24 } else if (browserEnv.Sencha) {
25 return Ext.create('Ext.device.filesystem.Sencha');
26 }
27 } else if (browserEnv.Chrome) {
28 return Ext.create('Ext.device.filesystem.Chrome');
29 }
30
31 return Ext.create('Ext.device.filesystem.Simulator');
32 }
33 });