defile 0.0.2
A convenience wrapper for the PHYSFS library.
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:
Defile
A convenience wrapper for the PHYSFS library, for the D Programming Language. Note that this is currently incomplete and will be fleshed out over time.
##Usage
This is an example. There is more functionality not demonstrated here.
import defile.defile;
void main() {
scope( exit ) Defile.terminate();
Defile.initialize();
// Read the entire content of a file.
ubyte[] buf;
Defile.readFile( "foo.bar", buf );
// Manipulate the bytes.
...
// Open a file for reading and read in smaller chunks.
auto file = Defile( "foo.bar", OpenFor.Read );
ubyte[] buf2;
// Read 32 bytes
file.read( buf2, 32, 1 );
// Read 128 bytes
file.read( buf2, 32, 4 );
// Alternatively...
file.read( buf2, 128, 1 );
// Close if you want, but the destructor will do so automatically on scope exit.
file.close();
}
- Registered by Mike Parker
- 0.0.2 released 9 years ago
- mdparker/Defile
- github.com/aldacron/Defile
- Boost
- Copyright © 2013, Michael D. Parker
- Authors:
- Dependencies:
- derelict-physfs
- Versions:
-
0.0.5 2016-Apr-24 0.0.4 2016-Apr-22 0.0.3 2015-Jul-08 0.0.2 2015-Jul-08 0.0.1 2015-Jul-08 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
232 downloads total
-
- Score:
- 0.6
- Short URL:
- defile.dub.pm