Is there any reasons to not use "mmap" to read files?

rempas rempas at tutanota.com
Sat Feb 12 13:17:19 UTC 2022


On Wednesday, 9 February 2022 at 02:07:05 UTC, user1234 wrote:
>
> `std.file.readText()` is just fine... your really want to do an 
> os with call `fgetc` for every single byte that has to be read ?

Good point! I was really wondering if "fgetc" does a system call 
every single time that it is called or if the text is buffered 
just like with "printf". I will use "read" in any case just to be 
sure tho. I don't want to use Phobos tho so I cannot use 
"file.readText". Thank you for your time!


More information about the Digitalmars-d mailing list