emscripten Humble Cloud interface
Edward Rudd
2014-08-30 d6e150cf4bd63f65b9a344910026fa533a1db694

rename driver methods

1 files modified
8 ■■■■ changed files
client/library/library_cloudfs.js 8 ●●●● patch | view | raw | blame | history
client/library/library_cloudfs.js
@@ -39,7 +39,7 @@
            var provider = CLOUD_PROVIDERS[provider_name];
            if (provider === undefined) return false;
            var requiredMethods = ['listFiles', 'downloadFile', 'uploadFile', 'removeFile'];
            var requiredMethods = ['allFiles', 'read', 'write', 'rm'];
            return requiredMethods.every(function(method) {
                return (method in provider);
            });
@@ -95,7 +95,7 @@
            return callback(null, { type: 'local', entries: entries });
        },
        getRemoteSet: function(mount, callback) {
          mount.opts.provider.listFiles(mount.opts.cloud, function(data) {
          mount.opts.provider.allFiles(mount.opts.cloud, function(data) {
            var entries = {},
                toAbsolute = function(p) { return PATH.join2(mount.mountpoint, p); };
            for(var k in data) {
@@ -162,7 +162,7 @@
        },
        loadRemoteEntry: function(mount, pathinfo, callback) {
            if (pathinfo.type == 'file') {
                mount.opts.provider.downloadFile(mount.opts.cloud, pathinfo.url,
                mount.opts.provider.read(mount.opts.cloud, pathinfo.url,
                    function(data) {
                        callback(null, { contents: data, timestamp: pathinfo.timestamp, mode: {{{ cDefine('S_IFREG') | 0777 }}} });
                    },
@@ -197,7 +197,7 @@
        },
        storeRemoteEntry: function(mount, pathinfo, entry, callback) {
            if (FS.isFile(entry.mode)) {
                mount.opts.provider.uploadFile(mount.opts.cloud, pathinfo, entry.contents, function() {
                mount.opts.provider.write(mount.opts.cloud, pathinfo, entry.contents, function() {
                    callback(null);
                },
                function(e) {