<commit_before>use core::clone::Clone;

use common::string::*;
use common::url::*;

use filesystems::unfs::*;

use programs::session::*;

pub struct FileScheme;

impl SessionScheme for FileScheme {
    fn scheme(&self) -> String {
        return "file".to_string();
    }

    #[allow(unused_variables)]
    fn on_url(&mut self, session: &Session, url: &URL) -> String {
        let unfs = UnFS::new();

        let mut path = String::new();
        for part in url.path.as_slice(){
            if path.len() > 0 {
                path = path + "/" + part.clone();
            }else{
                path = part.clone();
            }
        }

        let mut ret = String::new();
        for file in unfs.list(path.clone()).as_slice() {
            ret = ret + file.clone() + "\n";
        }
        return ret;
    }
}<commit_msg>Fix file scheme empty line<commit_after>use core::clone::Clone;

use common::string::*;
use common::url::*;

use filesystems::unfs::*;

use programs::session::*;

pub struct FileScheme;

impl SessionScheme for FileScheme {
    fn scheme(&self) -> String {
        return "file".to_string();
    }

    #[allow(unused_variables)]
    fn on_url(&mut self, session: &Session, url: &URL) -> String {
        let unfs = UnFS::new();

        let mut path = String::new();
        for part in url.path.as_slice(){
            if path.len() > 0 {
                path = path + "/" + part.clone();
            }else{
                path = part.clone();
            }
        }

        let mut ret = String::new();
        for file in unfs.list(path.clone()).as_slice() {
            if ret.len() > 0 {
                ret = ret + "\n" + file.clone();
            }else{
                ret = file.clone();
            }
        }
        return ret;
    }
}
{'fraction_non_alphanumeric': 0.15854341736694677, 'fraction_numerical': 0.0016806722689075631, 'mean_word_length': 1.7949921752738653, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, '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': '4249294', 'n_tokens_mistral': 550, 'n_tokens_neox': 537, 'n_words': 140}