feature(dropbox) add read

This commit is contained in:
coderaiser 2013-12-06 13:40:31 +00:00
parent 2cb28da206
commit 4605992cdf

View file

@ -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;