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;
44 inline 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);
57 inline 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);
70 inline QString readFileAsQString(QFile& f) noexcept
72 const auto sz = f.size();
73 if(
auto data = f.map(0, sz))
75 auto str = QString::fromUtf8(
reinterpret_cast<const char*
>(data), sz);
Base toolkit upon which the software is built.
Definition: Application.cpp:90
Definition: lib/score/tools/File.hpp:20