diff --git a/lib/client/storage/_dropbox.js b/lib/client/storage/_dropbox.js index 612ab797..6babc146 100644 --- a/lib/client/storage/_dropbox.js +++ b/lib/client/storage/_dropbox.js @@ -130,6 +130,23 @@ var CloudCmd, Util, DOM, Dropbox, cb, Client; }); }; + this.read = function(path, callback) { + Client.stat(path, function(error, stat) { + var msg, read; + + if (error) + msg = error.responseText; + else { + if (stat.isFile) + read = DropBoxStore.readFile; + else + read = DropBoxStore.readDir; + + read(path, callback); + } + }); + }; + this.writeFile = function(name, data, callback) { Client.writeFile(name, data, function(error, data) { var msg;