Phobos v3 idea: File interface

solidstate1991 laszloszeremi at outlook.com
Thu Sep 19 20:39:33 UTC 2024


In a nutshell:

Create either a base class or an interface, which defines basic 
file accessing capabilities, then let that be used for not just 
files on the disk, but for things like the network, memory mapped 
files (would be great for compressed files without writing them 
to the disk first, etc.).

Current workaround is to read the file at once, and while that 
has its own uses, also has its own downsides, especially at 
bigger filesizes.

I kind of did something like that with VFile, trying to copy the 
API of `std.stdio.File` as closely as possible, although I didn't 
end up using it as much as I wanted due to having to work on 
other libraries of mine instead of my data packaging one 
(Datapak). At least I'm pretty close to creating a minimalistic D 
native replacement of SDL, also I'm yet again working on my 
SDLang/KDL/XDL parser (latter being my own modification of 
SDLang, with ISO date/time and hexadecimal numbers).


More information about the Digitalmars-d mailing list