I've noticed that each tool has its own filesystem access code. Although Apple's HFS codebase does the same (that codebase is probably 2+ decades old), I do think a lot of the code can be reused and combined into the lib folder, like FreeBSD's libufs.
This will make it easier to addd other utilities to the codebase.