code: public int archive(final ArchiverFactory factory, OutputStream os, final DirScanner scanner) throws IOException, InterruptedException {
          final OutputStream out = (channel!=null)?new RemoteOutputStream(os):os;
          return act(new Archive(factory, out, scanner));
      }
docs: Archives this directory into the specified archive format, to the given {@link OutputStream}, by using
  {@link DirScanner} to choose what files to include.
  
  @return
  number of files/directories archived. This is only really useful to check for a situation where nothing
  is archived.