File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ These properties are added to the Pointer object properties.
96
96
will use File._ \_ create or Folder._ \_ create depending on existence of content
97
97
* __ delete([ force] ,[ callback] ) - delete folder from system, force will decide if rimraf or fs.rmdir is used
98
98
* __ list(callback) - use fs.readdir and return results
99
- * __ watchList(callback, [ persistent] ) - watch the folder changes and run __ list on changes to the folder
99
+ * __ watchList([ persistent] , callback ) - watch the folder changes and run __ list on changes to the folder
100
100
* __ removeChild(opts) - remove a child object either by property name or object
101
101
102
102
Original file line number Diff line number Diff line change @@ -114,7 +114,11 @@ function Folder(obj) {
114
114
}
115
115
} ,
116
116
__watchList : {
117
- value : function ( callback , persistent ) {
117
+ value : function ( persistent , callback ) {
118
+ if ( typeof persistent === 'function' ) {
119
+ callback = persistent ;
120
+ persistent = false ;
121
+ }
118
122
pointer . __listen ( 'change' , self . __list . bind ( self , callback ) ) ;
119
123
pointer . __listen ( 'error' , self . __list . bind ( self , callback ) ) ;
120
124
pointer . __listen ( 'missing' , callback ) ;
Original file line number Diff line number Diff line change 7
7
" files" ,
8
8
" pointer"
9
9
],
10
- "version" : " 0.1.0 " ,
10
+ "version" : " 0.1.1 " ,
11
11
"repository" : {
12
12
"type" : " git" ,
13
13
"url" : " git@github.com:DeadAlready/node-file-pointer"
You can’t perform that action at this time.
0 commit comments