FilePath.hpp
1 #pragma once
2 #include <score/document/DocumentContext.hpp>
3 
4 #include <QString>
5 
6 namespace score
7 {
8 
11 SCORE_LIB_BASE_EXPORT
12 QString
13 locateFilePath(const QString& filename, const score::DocumentContext& ctx) noexcept;
14 
17 SCORE_LIB_BASE_EXPORT
18 QString
19 relativizeFilePath(const QString& filename, const score::DocumentContext& ctx) noexcept;
20 
21 SCORE_LIB_BASE_EXPORT
22 QString addUniqueSuffix(const QString& fileName);
23 
24 struct FilePath
25 {
26  QString absolute;
27  QString relative; // Relative to the document root or same than absolute otherwise
28  QString filename;
29  QString basename;
30 };
31 
32 }
Base toolkit upon which the software is built.
Definition: Application.cpp:90
QString locateFilePath(const QString &filename, const score::DocumentContext &ctx) noexcept
Definition: File.cpp:57
QString relativizeFilePath(const QString &filename, const score::DocumentContext &ctx) noexcept
Definition: File.cpp:85
Definition: DocumentContext.hpp:18
Definition: FilePath.hpp:25