First, let's create an empty file:
$ touch me
Now let's run the following sample code:
int main(string[]) {
import std.mmfile;
scope f = new MmFile("me");
return 0;
}
It fails with the following error:
std.exception.ErrnoException@std/mmfile.d(351): Could not map file me (Invalid argument)
Now, let's add some content to our file
$ echo love > me
Running the program again now works as expected.