<commit_before>#include <ls.hpp>

#include <iostream>
#include <kdb>

using namespace kdb;
using namespace std;

LsCommand::LsCommand()
{}

int LsCommand::execute(int argc, char** argv)
{
	if (argc != 3)
	{
		cerr << "Please provide a name" << endl;
		cerr << "Usage: ls <name>" << endl;
		return 1;
	}

	kdb.get(ks, argv[2]);
	ks.rewind();
	Key k;
	while (k=ks.next())
	{
		cout << "key: " << k.getName() << " " << k.getString() << endl;;
	}

	return 0;
}

LsCommand::~LsCommand()
{}<commit_msg>dont use highlevel interface for ls<commit_after>#include <ls.hpp>

#include <iostream>
#include <kdb>

using namespace kdb;
using namespace std;

LsCommand::LsCommand()
{}

int LsCommand::execute(int argc, char** argv)
{
	if (argc != 3)
	{
		cerr << "Please provide a name" << endl;
		cerr << "Usage: ls <name>" << endl;
		return 1;
	}

	Key root (argv[2], KEY_END);
	if (!root)
	{
		cerr << "Not a valid name supplied" << endl;
		return 1;
	}

	kdb.get(ks, root);
	ks.rewind();
	Key k;
	while (k=ks.next())
	{
		cout << "key: " << k.getName() << " " << k.getString() << endl;;
	}

	return 0;
}

LsCommand::~LsCommand()
{}
{'fraction_non_alphanumeric': 0.20285969615728328, 'fraction_numerical': 0.00804289544235925, 'mean_word_length': 3.786324786324786, 'pattern_counts': {'":': 0, '<': 51, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6667991', 'n_tokens_mistral': 484, 'n_tokens_neox': 462, 'n_words': 118}