wip: everything but write/truncate implemented, untested