2#include <score/document/DocumentContext.hpp>
3#include <score/tools/FilePath.hpp>
22 explicit PathInfo(std::string_view v)
noexcept;
26 const std::string_view absoluteFilePath;
29 std::string_view fileName;
32 std::string_view completeBaseName;
35 std::string_view baseName;
38 std::string_view absolutePath;
41 std::string_view parentDirName;
44inline QByteArray mapAsByteArray(QFile& f)
noexcept
46 const auto sz = f.size();
47 if(
auto data = f.map(0, sz))
49 return QByteArray::fromRawData(
reinterpret_cast<const char*
>(data), sz);
57inline std::string_view mapAsStringView(QFile& f)
noexcept
59 const auto sz = f.size();
60 if(
auto data = f.map(0, sz))
62 return std::string_view(
reinterpret_cast<const char*
>(data), sz);
70inline std::string readFileAsString(QFile& f)
noexcept
73 const auto sz = f.size();
74 if(
auto data = f.map(0, sz))
76 str = std::string(
reinterpret_cast<const char*
>(data), sz);
82inline QString readFileAsQString(QFile& f)
noexcept
85 const auto sz = f.size();
86 if(
auto data = f.map(0, sz))
88 str = QString::fromUtf8(
reinterpret_cast<const char*
>(data), sz);
Base toolkit upon which the software is built.
Definition Application.cpp:97
Definition lib/score/tools/File.hpp:20