code: private void visitImages(CmsObject cms, File directory) {
  
          if (!directory.canRead() || !directory.isDirectory()) {
              return;
          }
          File[] files = directory.listFiles(m_filter);
          for (int i = 0; i < files.length; i++) {
              File f = files[i];
              if (f.isDirectory()) {
                  visitImages(cms, f);
                  continue;
              }
              visitImage(cms, f);
          }
      }
docs: Visits all cached images in the given directory.<p>
  
  @param cms the cms context
  @param directory the directory to visit