Open filename and map it in memory. If Datum is const, opens for
read-only and maps the content in memory; no error is issued if the file
does not exist. This makes it easy to treat a non-existing file as empty.
If Datum is mutable, opens for read/write (creates file if it does not
exist) and fails fatally on any error.
Due to quirks in mmap, if the file is empty, handle is valid but data
is null. This state is valid and accounted for.
Open filename and map it in memory. If Datum is const, opens for read-only and maps the content in memory; no error is issued if the file does not exist. This makes it easy to treat a non-existing file as empty.
If Datum is mutable, opens for read/write (creates file if it does not exist) and fails fatally on any error.
Due to quirks in mmap, if the file is empty, handle is valid but data is null. This state is valid and accounted for.