var f = Gio.file_new_for_path(path);
//var cancel = new Gio.Cancellable ();
if (depth > 0) {
+
var fm = f.monitor(2,null); //Gio.FileMonitorFlags.SEND_MOVED
+
+
XObject.isSeed ? fm.signal.changed.connect(fn) : fm.connect('changed',fn);
this.monitors.push(fm);
// this.initRepo(path);
//}
-
- var file_enum = f.enumerate_children(
+ var file_enum = f.enumerate_children(
Gio.FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME + ','+
Gio.FILE_ATTRIBUTE_STANDARD_TYPE,
Gio.FileQueryInfoFlags.NONE,
null);
- var next_file;
+ var next_file;
while ((next_file = file_enum.next_file(null)) != null) {
+ //print("got a file " + next_file.sudo () + '?=' + Gio.FileType.DIRECTORY);
+
if (next_file.get_file_type() != Gio.FileType.DIRECTORY) {
next_file = null;
continue;
}
var sp = path+'/'+next_file.get_display_name();
// skip modules.
-
+ //print("got a file : " + sp);
+
next_file = null;
+
+
+
this.monitor(sp, fn, depth + 1);
}