@Override
 public final D scan(I container, String path, Scope scope, Scanner scanner) throws IOException {
   ScannerContext context = scanner.getContext();
   D containerDescriptor = getContainerDescriptor(container, context);
   String containerPath = getContainerPath(container, path);
   containerDescriptor.setFileName(containerPath);
   LOGGER.info("Entering {}", containerPath);
   ContainerFileResolver fileResolverStrategy = new ContainerFileResolver(containerDescriptor);
   context.push(FileResolver.class, fileResolverStrategy);
   enterContainer(container, containerDescriptor, scanner.getContext());
   Stopwatch stopwatch = Stopwatch.createStarted();
   try {
     Iterable<? extends E> entries = getEntries(container);
     for (E entry : entries) {
       String relativePath = getRelativePath(container, entry);
       try (Resource resource = getEntry(container, entry)) {
         LOGGER.debug("Scanning {}", relativePath);
         FileDescriptor descriptor = scanner.scan(resource, relativePath, scope);
         fileResolverStrategy.put(relativePath, descriptor);
       }
     }
   } finally {
     leaveContainer(container, containerDescriptor, scanner.getContext());
     context.pop(FileResolver.class);
   }
   fileResolverStrategy.flush();
   LOGGER.info(
       "Leaving {} ({} entries, {} ms)",
       containerPath,
       fileResolverStrategy.size(),
       stopwatch.elapsed(MILLISECONDS));
   return containerDescriptor;
 }