forked from dlang/cdcdb
Переписана под ООП
This commit is contained in:
parent
46138c032a
commit
8a9142234e
14 changed files with 372 additions and 526 deletions
16
test/app.d
16
test/app.d
|
@ -6,12 +6,18 @@ import std.file : read;
|
|||
|
||||
void main()
|
||||
{
|
||||
auto cas = new CAS("/tmp/base.db", true);
|
||||
cas.newSnapshot("/tmp/text", cast(ubyte[]) read("/tmp/text"));
|
||||
// import std.stdio : writeln;
|
||||
auto storage = new Storage("/tmp/base.db", true);
|
||||
storage.newSnapshot("/tmp/text", cast(ubyte[]) read("/tmp/text"));
|
||||
|
||||
foreach (snapshot; cas.getSnapshots()) {
|
||||
writeln(snapshot);
|
||||
// if (snapshot !is null) {
|
||||
// writeln(cast(string) snapshot.data);
|
||||
// snapshot.remove();
|
||||
// }
|
||||
|
||||
import std.stdio : writeln;
|
||||
|
||||
foreach (snapshot; storage.getSnapshots()) {
|
||||
writeln(cast(string) snapshot.data);
|
||||
}
|
||||
|
||||
// writeln(cas.getVersion);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue