VFS and Checksums Integration
A VFS overrideschecksum when its service stores hashes. It returns None
(TypeScript: null) when it has no stored hash, and Mirage reads and hashes
the file instead. The example extends NotesVFS from
Adding a New VFS, mounted at /notes.
checksum
The stored hash of one file.
Commands: md5sum, md5, sha1sum, sha224sum, sha256sum,
sha384sum, sha512sum and b2sum. With -c, which checks the hashes
listed in a file, they read the files without asking.
The hash to return:
md5, sha1, sha224, sha256, sha384, sha512, blake2b, or blake2b-N for BLAKE2b at N bits.- Python
- TypeScript
md5sum /notes/hello.txt reads nothing, and
sha256sum /notes/hello.txt still reads the page.