vfile 0.1.1

Reads and writes a memory location as if it were a file.


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

vfile

Implements a virtual file, meaning a memory location can be read and written like if it were a file, reducing overloads through the use of templates. Created by László Szerémi (https://twitter.com/ziltoid1991 https://www.patreon.com/ShapeshiftingLizard https://ko-fi.com/shapeshiftinglizard [email protected]).

Mostly compatible with Phobos'es std.stdio's File structure.

Possible applications

  • Use for loading directly from archives
  • Avoiding disk usage during unittests
  • Using memory as a file buffer
  • Etc.

Usage

Code example

`import std.stdio; import vfile;

LoadedObject loadSomething(F = File)(F file){

HeaderStruct[1] header;
file.rawRead(header);
[...]

} `

dub.sdl

dependency "vfile" version="*"

dub.json

`dependencies{

"vfile" : "*"

}`

Authors:
  • Laszlo Szeremi
Dependencies:
none
Versions:
1.0.0 2019-Feb-12
0.1.2 2019-Jan-28
0.1.1 2018-Dec-18
0.1.0 2018-Dec-10
~master 2019-Feb-12
Show all 5 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 144 downloads total

Score:
0.7
Short URL:
vfile.dub.pm