Update sample-files tool to write json to a file. (#370)

This commit is contained in:
Nick Chapman
2024-10-24 14:43:10 +01:00
committed by GitHub Enterprise
parent a1edeaa423
commit 3ad28f4981
3 changed files with 29 additions and 7 deletions
+2 -3
View File
@@ -1,5 +1,3 @@
#include <cstdint>
#include <cstdio>
#include <string>
@@ -69,7 +67,8 @@ int main(int argc, char** argv) {
ShardDBTools::fsck(dbPath);
} else if (arg == "sample-files") {
std::string dbPath = getNextArg();
ShardDBTools::sampleFiles(dbPath);
std::string outputFilePath = getNextArg();
ShardDBTools::sampleFiles(dbPath, outputFilePath);
} else {
dieWithUsage();
}