┌─────────┐ ┌──────┐ ┌ ─ ─ ─ ┌─────┐ ┌──────┐ │Generator│ .pipe({end: false}) │path │ ┌────┐│ │funil│ ┌────┐ │out │ │Stream │──────────────┬────────────────▶│stream│──┬─▶│HEAD│──┬─▶│ │─ ─ ──▶│JSON│────▶│stream│ └─────────┘ │ .pipe({ └──────┘ │ └────┘│ │ └─────┘ │ └────┘ │ └──────┘ │ end: false │ │┌────┐ │ ┌────┐ │ │ }) ├─▶│GET │├─┤ ├ ─▶│XML │─ ┤ │ │ │└────┘ │ └────┘ │ │ ┌────┐│ │ │ ┌────┐ │ │ .on('end') ├─▶│PUT │──┤ ─ ▶│CSV │─ ┌──────────┐ ┌─────────┐ │ └────┘│ │ │ └────┘ │ │Add dir as│ │Generator│ │ │┌────┐ │ ┌────┐ ┌──│a prefix │◀─────│Stream │◀─┐ ├─▶│POST│├─┤ ├ ─▶│TSV │─ ┤ │ └──────────┘ └─────────┘ │ │ │└────┘ │ └────┘ │.pipe({end: false}) │ └─▶ ... ├─┘ └ ─▶ ... ─ ┘ │ │ │ ┌─────────┐ │ ┌─────────┐ if a dir Λ ─ ─ ─ ┘ │Generator│ │ │Test for │ is found ╱ ╲ │Stream │─────┴────────▶│directory│──────────▶▕ + ▏ └─────────┘.pipe({ └─────────┘ ╲ ╱ end: false .on('drain') V })