<commit_before>#include <cli/Session.h>
#include <cli/CommandLine.h>
#include <cli/PosixStreams.h>
#include <cli/Tokenizer.h>

#include <mtp/make_function.h>

#include <stdio.h>

namespace cli
{

	Session::Session(const mtp::DevicePtr &device):
		_device(device),
		_session(_device->OpenSession(1)),
		_gdi(_session->GetDeviceInfo()),
		_cd(mtp::Session::Root),
		_running(true)
	{
		using namespace mtp;
		using namespace std::placeholders;

		printf("%s\n", _gdi.VendorExtensionDesc.c_str());
		printf("%s ", _gdi.Manufacturer.c_str());
		printf("%s ", _gdi.Model.c_str());
		printf("%s ", _gdi.DeviceVersion.c_str());
		//printf("%s", _gdi.SerialNumber.c_str());
		printf("\n");
		printf("supported op codes: ");
		for(OperationCode code : _gdi.OperationsSupported)
		{
			printf("%04x ", (unsigned)code);
		}
		printf("\n");
		printf("supported properties: ");
		for(u16 code : _gdi.DevicePropertiesSupported)
		{
			printf("%04x ", (unsigned)code);
		}
		printf("\n");

		AddCommand("help",			make_function([this]() -> void { Help(); }));

		AddCommand("ls",			make_function([this]() -> void { List(); }));
		AddCommand("list",			make_function([this]() -> void { List(); }));
		AddCommand("list", 			make_function([this](mtp::u32 parent) -> void { List(parent); }));

		AddCommand("quit", 			make_function([this]() -> void { Quit(); }));
		AddCommand("exit", 			make_function([this]() -> void { Quit(); }));

		AddCommand("rm", 			make_function([this](const LocalPath &path) -> void { Delete(path); }));<commit_msg>commented rm, as it now deletes whole root<commit_after>#include <cli/Session.h>
#include <cli/CommandLine.h>
#include <cli/PosixStreams.h>
#include <cli/Tokenizer.h>

#include <mtp/make_function.h>

#include <stdio.h>

namespace cli
{

	Session::Session(const mtp::DevicePtr &device):
		_device(device),
		_session(_device->OpenSession(1)),
		_gdi(_session->GetDeviceInfo()),
		_cd(mtp::Session::Root),
		_running(true)
	{
		using namespace mtp;
		using namespace std::placeholders;

		printf("%s\n", _gdi.VendorExtensionDesc.c_str());
		printf("%s ", _gdi.Manufacturer.c_str());
		printf("%s ", _gdi.Model.c_str());
		printf("%s ", _gdi.DeviceVersion.c_str());
		//printf("%s", _gdi.SerialNumber.c_str());
		printf("\n");
		printf("supported op codes: ");
		for(OperationCode code : _gdi.OperationsSupported)
		{
			printf("%04x ", (unsigned)code);
		}
		printf("\n");
		printf("supported properties: ");
		for(u16 code : _gdi.DevicePropertiesSupported)
		{
			printf("%04x ", (unsigned)code);
		}
		printf("\n");

		AddCommand("help",			make_function([this]() -> void { Help(); }));

		AddCommand("ls",			make_function([this]() -> void { List(); }));
		AddCommand("list",			make_function([this]() -> void { List(); }));
		AddCommand("list", 			make_function([this](mtp::u32 parent) -> void { List(parent); }));

		AddCommand("quit", 			make_function([this]() -> void { Quit(); }));
		AddCommand("exit", 			make_function([this]() -> void { Quit(); }));

		//AddCommand("rm", 			make_function([this](const LocalPath &path) -> void { Delete(path); }));
{'fraction_non_alphanumeric': 0.21314676212170516, 'fraction_numerical': 0.00585746827204686, 'mean_word_length': 4.911538461538462, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 33, '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': '1148808', 'n_tokens_mistral': 1184, 'n_tokens_neox': 1093, 'n_words': 181}