code: public void directoryToArc(File srcDir, File tgtDir, String prefix) 
  	throws IOException {
  		
  		File target[] = {tgtDir};
  
  		ARCWriter writer = new ARCWriter(new AtomicInteger(),
  				getSettings(true,prefix,Arrays.asList(target)));
  		File sources[] = srcDir.listFiles();
  		LOGGER.info("Found " + sources.length + " files in " + srcDir);
  		for(int i = 0; i<sources.length; i++) {
  			addFile(sources[i]);
  		}
  		LOGGER.info("Associated " + sources.length + " files in " + srcDir);
  
  		// sort keys and write them all:
  		Object arr[] = components.keySet().toArray();
  		Arrays.sort(arr);
  		for(int i = 0; i < arr.length; i++) {
  			String key = (String) arr[i];
  			RecordComponents rc = components.get(key);
  			rc.writeRecord(writer,srcDir);
  			LOGGER.info("Wrote record keyed " + rc.key);			
  		}
  		writer.close();
  		LOGGER.info("Closed arc file named " + 
  				writer.getFile().getAbsolutePath());
  	}
docs: Reads all component files (.meta, .body, .sh) in srcDir, and writes
  one or more ARC files in tgtDir with names beginning with prefix.
  
  @param srcDir
  @param tgtDir
  @param prefix
  @throws IOException