vfile 0.1.2

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:

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 laszloszeremi@outlook.com).

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:
0.1.2 2019-Jan-28
0.1.1 2018-Dec-18
0.1.0 2018-Dec-10
~master 2019-Feb-12
Show all 4 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 1 downloads this month

  • 18 downloads total

Score:
1.0
Short URL:
vfile.dub.pm