<commit_before>#include <Bull/Core/FileSystem/Directory.hpp>
#include <Bull/Core/FileSystem/File.hpp>
#include <Bull/Core/FileSystem/Path.hpp>
#include <Bull/Core/FileSystem/PathImpl.hpp>

namespace Bull
{
    Path::Path(const String& path) :
        m_path(path)
    {
        /// Nothing
    }

    bool Path::operator==(const Path& right) const
    {
        return toString() == right.toString();
    }

    bool Path::operator!=(const Path& right) const
    {
        return toString() != right.toString();
    }

    Path Path::getParent() const
    {
        std::size_t end = m_path.last(Separator);

        if(end == String::InvalidPosition)
        {
            return Path(m_path);
        }

        return Path(m_path.subString(0, end));
    }

    Path Path::resolve(const String& child) const
    {
        return Path(toString() + Separator + child);
    }

    String Path::getFileName() const
    {
        std::size_t start = m_path.last(Separator);

        if(start == String::InvalidPosition)
        {
            return m_path;
        }

        return m_path.subString(start + 1);
    }

    Path Path::toAbsolute() const
    {
        return Path(prv::PathImpl::realPath(m_path));
    }

    bool Path::isFile() const
    {<commit_msg>[Core/Path] Fix double separator in resolve<commit_after>#include <Bull/Core/FileSystem/Directory.hpp>
#include <Bull/Core/FileSystem/File.hpp>
#include <Bull/Core/FileSystem/Path.hpp>
#include <Bull/Core/FileSystem/PathImpl.hpp>

namespace Bull
{
    Path::Path(const String& path) :
        m_path(path)
    {
        /// Nothing
    }

    bool Path::operator==(const Path& right) const
    {
        return toString() == right.toString();
    }

    bool Path::operator!=(const Path& right) const
    {
        return toString() != right.toString();
    }

    Path Path::getParent() const
    {
        std::size_t end = m_path.last(Separator);

        if(end == String::InvalidPosition)
        {
            return Path(m_path);
        }

        return Path(m_path.subString(0, end));
    }

    Path Path::resolve(const String& child) const
    {
        if(child.at(0) == Separator)
        {
            return Path(toString() + child);
        }

        return Path(toString() + Separator + child);
    }

    String Path::getFileName() const
    {
        std::size_t start = m_path.last(Separator);

        if(start == String::InvalidPosition)
        {
            return m_path;
        }

        return m_path.subString(start + 1);
    }

    Path Path::toAbsolute() const
    {
        return Path(prv::PathImpl::realPath(m_path));
    }

    bool Path::isFile() const
    {
{'fraction_non_alphanumeric': 0.13528748590755355, 'fraction_numerical': 0.0018789928598271326, 'mean_word_length': 2.2305825242718447, 'pattern_counts': {'":': 0, '<': 11, '<?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': '5266090', 'n_tokens_mistral': 844, 'n_tokens_neox': 827, 'n_words': 158}