Publish Vulpes Preview 15 sources for desktop, Android and Tundra

Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
This commit is contained in:
OverSu 2026-09-30 23:13:03 +02:00
commit b38dea0597
25901 changed files with 9982925 additions and 369 deletions

View file

@ -0,0 +1,55 @@
'use strict';
var fileManagerFactory = require('./lib/file_manager_factory'),
deviceStorageFactory = require('./lib/device_storage_factory');
/**
* A marionette plugin for managing(add, remove) files in device storage.
* The options param is structured as { tpye: 'DesktopClient' }.
*
* @constructor
* @param {Marionette.Client} client marionette client to use.
* @param {Object} options setup the file manager.
*/
function MarionetteFileManager(client, options) {
var type = '';
this.client = client;
this.options = options || { type: 'DesktopClient' };
type = this.options.type || 'DesktopClient';
this.deviceStorage = deviceStorageFactory.generate(client, type);
this.fileManager = fileManagerFactory.generate(this.deviceStorage, type);
}
MarionetteFileManager.prototype = {
/**
* Add files.
*
* @param {String|Array} files the path of files.
*/
add: function(files) {
this.fileManager.add(files);
},
/**
* Remove files.
*
* @param {String|Array} files the path of files.
*/
remove: function(files) {
this.fileManager.remove(files);
},
/**
* Clean all files in device storage.
*/
removeAllFiles: function() {
this.fileManager.removeAllFiles();
}
};
MarionetteFileManager.setup = function(client, options) {
return new MarionetteFileManager(client, options);
};
module.exports = MarionetteFileManager;