<commit_before>#include "BrowseSDHandler.h"
#include <SPI.h>
#include <SD.h>
#include "sd/File.h"
#include "sd/SDWebFile.h"
#include "web/IWebFile.h"
#include "web/renderer/Link.h"
#include "web/renderer/AsyncHtmlRenderer.h"

namespace sentinel {
    namespace handler {
        namespace sd {
                        
            void BrowseSDHandler::setPath(web::Method method, 
                    std::shared_ptr<std::string> uri) {   
                this->uri = uri;
                this->method = method;
            }                
                
            bool BrowseSDHandler::canHandle() const {
                return uri->compare(0, pathPrefix.size(), pathPrefix) == 0 && 
                        method == web::Method::GET;
            }
            
            

            std::string BrowseSDHandler::getBrowsePath() {
                return uri->substr(3);
            }            
            
            BrowseSDHandler::BrowseSDHandler(sentinel::log::Logger& logger) : <commit_msg>Removed hardcode from the browseSDHandler file<commit_after>#include "BrowseSDHandler.h"
#include <SPI.h>
#include <SD.h>
#include "sd/File.h"
#include "sd/SDWebFile.h"
#include "web/IWebFile.h"
#include "web/renderer/Link.h"
#include "web/renderer/AsyncHtmlRenderer.h"

namespace sentinel {
    namespace handler {
        namespace sd {
                        
            void BrowseSDHandler::setPath(web::Method method, 
                    std::shared_ptr<std::string> uri) {   
                this->uri = uri;
                this->method = method;
            }                
                
            bool BrowseSDHandler::canHandle() const {
                return uri->compare(0, pathPrefix.size(), pathPrefix) == 0 && 
                        method == web::Method::GET;
            }
            
            

            std::string BrowseSDHandler::getBrowsePath() {
                return uri->substr(pathPrefix.size());
            }            
            
            BrowseSDHandler::BrowseSDHandler(sentinel::log::Logger& logger) : 
{'fraction_non_alphanumeric': 0.11421686746987952, 'fraction_numerical': 0.0024096385542168677, 'mean_word_length': 1.55980271270037, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 17, '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': '4313535', 'n_tokens_mistral': 585, 'n_tokens_neox': 563, 'n_words': 99}