protected override void watch(ch.cyberduck.core.Local file, FileWatcherListener listener)
 {
     _watcher              = new FileSystemWatcher();
     _watcher.Path         = file.getParent().getAbsolute();
     _watcher.Filter       = file.getName();
     _watcher.NotifyFilter = NotifyFilters.LastAccess | NotifyFilters.LastWrite | NotifyFilters.FileName |
                             NotifyFilters.DirectoryName;
     _watcher.Changed += delegate(object sender, FileSystemEventArgs e)
     {
         Log.debug("HasChanged:" + e.FullPath);
         listener.fileWritten(file);
     };
     _watcher.Renamed += delegate(object sender, RenamedEventArgs e)
     {
         Log.debug(String.Format("HasRenamed: from {0} to {1}", e.OldFullPath, e.FullPath));
         listener.fileWritten(file);
     };
     // Begin watching.
     _watcher.EnableRaisingEvents = true;
 }
Пример #2
0
 public SystemLocal(ch.cyberduck.core.Local parent, string name)
     : base(parent, MakeValidFilename(name))
 {
 }
 protected override License open(ch.cyberduck.core.Local l)
 {
     return(EMPTY_LICENSE);
 }