Directory listings are derived from the keys, so a fixture declares files only and the tree falls
out; a fixture that had to declare its directories too would drift from the files in it.
IT HOLDS BYTES, not strings, and a seeded string is UTF-8 encoded on the way in. That is what
nodeFiles does, so size() and readBytes().length agree here for the same reason they agree
on a real disk. Storing the string and encoding on read would make a binary fixture -- a database,
a pack -- read back as something other than what was written.
A filesystem over a flat path map.
Directory listings are derived from the keys, so a fixture declares files only and the tree falls out; a fixture that had to declare its directories too would drift from the files in it.
IT HOLDS BYTES, not strings, and a seeded string is UTF-8 encoded on the way in. That is what
nodeFilesdoes, sosize()andreadBytes().lengthagree here for the same reason they agree on a real disk. Storing the string and encoding on read would make a binary fixture -- a database, a pack -- read back as something other than what was written.