The Node.js fs
and path
APIs are needlessly complicated and crude. Antipathy is Node.js filesystem manipulation for humans. Inspired by Python's pathlib.
If you need help or want to request a feature or report a bug, please open an issue!
const p = new Path("/etc/");
p.push("apt.d/sources.list");
p.pop();
p.getAbsolute(); // => /etc/apt.d
p.getRelative("/etc"); // => apt.d
See src/main.spec.ts
for more examples.
- 0 dependencies (can even run on the browser!)
- Written in TypeScript with complete type coverage
- Advanced path resolution algorithms for maximum safety