system/src/sc/layer/LayeredSystem.java
public boolean checkRemovedDirectory(String dirPath) {
      try {
         acquireDynLock(false);
         File dir = new File(dirPath);
         if (!dir.isDirectory()) {
            boolean needsRefresh = false;
            for (File layerPathDir:layerPathDirs) {
               String layerPathFile = layerPathDir.getPath();
               if (dirPath.startsWith(layerPathFile)) {
                  needsRefresh = true;
                  break;
               }
            }
            if (!peerMode && peerSystems != null) {
               for (LayeredSystem peerSys:peerSystems) {
                  needsRefresh = peerSys.checkRemovedDirectory(dirPath) || needsRefresh;
               }
            }
            if (needsRefresh) {
               boolean dirRemoved;
               dirRemoved = checkRemovedDirectoryList(layers, dirPath);
               dirRemoved |= checkRemovedDirectoryList(inactiveLayers, dirPath);
               return dirRemoved;
            }
         }
         else
            System.out.println("*** checkRemovedDirectory called with directory that exists: " + dirPath);

      }
      finally {
         releaseDynLock(false);
      }
      return false;
   }
/** Checks if the directory has been removed and if so, updates the indexes */
Checks if the directory has been removed and if so, updates the indexes
Checks if the directory has been removed and if so updates the indexes
public boolean checkRemovedDirectory(String dirPath) {
      try {
         acquireDynLock(false);
         File dir = new File(dirPath);
         if (!dir.isDirectory()) {
            boolean needsRefresh = false;
            for (File layerPathDir:layerPathDirs) {
               String layerPathFile = layerPathDir.getPath();
               if (dirPath.startsWith(layerPathFile)) {
                  needsRefresh = true;
                  break;
               }
            }
            if (!peerMode && peerSystems != null) {
               for (LayeredSystem peerSys:peerSystems) {
                  needsRefresh = peerSys.checkRemovedDirectory(dirPath) || needsRefresh;
               }
            }
            if (needsRefresh) {
               boolean dirRemoved;
               dirRemoved = checkRemovedDirectoryList(layers, dirPath);
               dirRemoved |= checkRemovedDirectoryList(inactiveLayers, dirPath);
               return dirRemoved;
            }
         }
         else
            System.out.println("*** checkRemovedDirectory called with directory that exists: " + dirPath);
      }
      finally {
         releaseDynLock(false);
      }
      return false;
   }
public boolean checkRemovedDirectory ( String dirPath ) { try { acquireDynLock ( false ) ; File dir = new File ( dirPath ) ; if ( ! dir . isDirectory ( ) ) { boolean needsRefresh = false ; for ( File layerPathDir : layerPathDirs ) { String layerPathFile = layerPathDir . getPath ( ) ; if ( dirPath . startsWith ( layerPathFile ) ) { needsRefresh = true ; break ; } } if ( ! peerMode && peerSystems != null ) { for ( LayeredSystem peerSys : peerSystems ) { needsRefresh = peerSys . checkRemovedDirectory ( dirPath ) || needsRefresh ; } } if ( needsRefresh ) { boolean dirRemoved ; dirRemoved = checkRemovedDirectoryList ( layers , dirPath ) ; dirRemoved |= checkRemovedDirectoryList ( inactiveLayers , dirPath ) ; return dirRemoved ; } } else System . out . println ( "*** checkRemovedDirectory called with directory that exists: " + dirPath ) ; } finally { releaseDynLock ( false ) ; } return false ; }
Checks if the directory has been removed and if so, updates the indexes
Checks if the directory has been removed and if so updates the indexes