@Override public void fileChanged(FileChangeEvent event) { int type = event.getEventType(); String changedPath = event.getPath(); // NB: TOUCHED ==> no change in file contents if (type != FILE_TOUCHED || m_mode.equals("auto")) { Messages.postDebug("SQUpdater", "FILE CHANGED: " + changedPath); if ((m_mode.equals("submit") || m_mode.equals("more") // || m_mode.equals("auto") || m_mode.equals("build")) && changedPath.equals(m_autoWatchPath)) { String dataDir = getDataDir(m_autodir); if (dataDir != null && dataDir.length() > 0 && !dataDir.equals(m_dataDir)) { m_currentFileWatcher.removePath(m_dataWatchPath); Messages.postDebug("SQUpdater", "Removed " + m_dataWatchPath); m_dataDir = dataDir; m_dataWatchPath = m_archiveDir + "/" + m_dataDir + "/dirinfo/macdir/ACQlist"; m_currentFileWatcher.addPath(m_dataWatchPath); Messages.postDebug("SQUpdater", "Added " + m_dataWatchPath); } } if (m_mode.equals("auto") && type != FILE_INITIAL) { updateStatsAuto(); } else if (m_mode.equals("bgstudy")) { updateStatsBgstudy(); } else if (m_mode.equals("submit")) { updateStatsSubmit(); } else if (m_mode.equals("more")) { updateStatsMore(); } else if (m_mode.equals("build") && type != FILE_INITIAL) { updateStatsBuild(false); } else if (m_mode.equals("active") && type != FILE_INITIAL) { updateStatsActive(); } } }