1
0
Fork 0
forked from dlang/cdcdb

Переписана под ООП

This commit is contained in:
Alexander Zhirov 2025-09-12 23:37:12 +03:00
parent 46138c032a
commit 8a9142234e
Signed by: alexander
GPG key ID: C8D8BE544A27C511
14 changed files with 372 additions and 526 deletions

View file

@ -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);