Permalink
Browse files

added content

  • Loading branch information...
1 parent 3af7136 commit ac18243bb68722536130ae873d0eb02693093f55 @tommy351 committed Sep 3, 2012
Showing with 21 additions and 1 deletion.
  1. +21 −1 lib/qfs.js
View
@@ -494,10 +494,30 @@ utils.each({
],
content: [
function(data, callback){
+ if (utils.isFunction(data)){
+ callback = data;
+ data = null;
+ }
+ // read data
+ if (utils.isUndefined(data)){
+ this.read(callback);
+ // write data
+ } else {
+ this.write(data, callback);
+ }
+
+ return this;
},
function(data){
-
+ // read data
+ if (utils.isUndefined(data)){
+ return this.read();
+ // write data
+ } else {
+ this.write(data);
+ return this;
+ }
}
]
}, function(value, key){

0 comments on commit ac18243

Please sign in to comment.