private void recurse(Bundle bundle, String path, IResourceVisitor visitor, String relPathName) throws IOException {
		Enumeration<?> entries = bundle.findEntries(path, "*", false); //$NON-NLS-1$
		if (entries != null) {
			while (entries.hasMoreElements()) {
				URL child = (URL)entries.nextElement();
				String childPath = child.getPath();
				String temp = childPath;
				if (temp.endsWith("/")) { //$NON-NLS-1$
					temp = temp.substring(0, temp.length()-1);
				}
				int idx = temp.lastIndexOf("/"); //$NON-NLS-1$
				String childName = temp.substring(idx+1);
				String relPath = relPathName
						+ (relPathName.length() == 0 ? "" : "/") //$NON-NLS-1$ //$NON-NLS-2$
						+ childName;
				boolean result = visitor.visitResource(
						new VisitorResource(child, relPath), relPath);
				if (result && child.getPath().endsWith("/")) { //$NON-NLS-1$
					recurse(bundle, childPath, visitor, relPath);
				}
			}
		}
	}
private void recurse ( Bundle bundle , String path , IResourceVisitor visitor , String relPathName ) throws IOException { Enumeration < ? > entries = bundle . findEntries ( path , "*" , false ) ; if ( entries != null ) { while ( entries . hasMoreElements ( ) ) { URL child = ( URL ) entries . nextElement ( ) ; String childPath = child . getPath ( ) ; String temp = childPath ; if ( temp . endsWith ( "/" ) ) { temp = temp . substring ( 0 , temp . length ( ) - 1 ) ; } int idx = temp . lastIndexOf ( "/" ) ; String childName = temp . substring ( idx + 1 ) ; String relPath = relPathName + ( relPathName . length ( ) == 0 ? "" : "/" ) + childName ; boolean result = visitor . visitResource ( new VisitorResource ( child , relPath ) , relPath ) ; if ( result && child . getPath ( ) . endsWith ( "/" ) ) { recurse ( bundle , childPath , visitor , relPath ) ; } } } }
Internal method for recursing sub directories.

@param file
The file object
@param visitor
The {@link IResourceVisitor} to call for non-folder resources
@throws IOException