Streaming file-system utilities for the anabranch ecosystem.

Multi-value operations return a Source so results can be streamed, filtered, and transformed with the full anabranch API. Single-value operations return a Task for composable error handling.

Examples

Read all lines from a file

import { readLines } from "@anabranch/fs";

const { successes } = await readLines("./data.txt").partition();
console.log(successes.join("\n"));

Walk a directory and find TypeScript files

import { glob } from "@anabranch/fs";

const results = await glob("./src", "*.ts").collect();
console.log(results.map((e) => e.path));