<commit_before>//
// ulib - a collection of useful classes
// Copyright (C) 2014-2017 <NAME>
//
/// \file Path.hpp Path class
//

#pragma once

/// file and folder path class
class Path
{
public:
   // ctors

   /// default ctor
   explicit Path()
   {
      // no further initialisation necessary
   }

   /// ctor that takes a path
   explicit Path(const CString& path)
      :m_path(path)
   {
   }

   // operators

   /// returns CString
   explicit operator const CString&() const { return m_path; }
   /// returns raw string pointer
   explicit operator LPCTSTR() const { return m_path; }

   // getters

   /// converts path to string
   CString ToString() const { return m_path; }

   /// returns filename and extension
   CString FilenameAndExt() const;

   /// returns filename without extension
   CString FilenameOnly() const;

   /// returns folder name, without filename, but ending slash
   CString FolderName() const;
<commit_msg>removed explicit specifier from Path conversion operators to CString and LPCTSTR<commit_after>//
// ulib - a collection of useful classes
// Copyright (C) 2014-2017 <NAME>
//
/// \file Path.hpp Path class
//

#pragma once

/// file and folder path class
class Path
{
public:
   // ctors

   /// default ctor
   explicit Path()
   {
      // no further initialisation necessary
   }

   /// ctor that takes a path
   explicit Path(const CString& path)
      :m_path(path)
   {
   }

   // operators

   /// returns CString
   operator const CString&() const { return m_path; }
   /// returns raw string pointer
   operator LPCTSTR() const { return m_path; }

   // getters

   /// converts path to string
   CString ToString() const { return m_path; }

   /// returns filename and extension
   CString FilenameAndExt() const;

   /// returns filename without extension
   CString FilenameOnly() const;

   /// returns folder name, without filename, but ending slash
   CString FolderName() const;

{'fraction_non_alphanumeric': 0.10396294390118374, 'fraction_numerical': 0.008234688625836336, 'mean_word_length': 2.502702702702703, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '485008', 'n_tokens_mistral': 583, 'n_tokens_neox': 551, 'n_words': 206}