lmms
Cross-platform music production software
Loading...
Searching...
No Matches
PathUtil.h File Reference
#include <filesystem>
#include <string_view>
#include <QDir>
#include "lmms_export.h"

Go to the source code of this file.

Namespaces

namespace  lmms
namespace  lmms::PathUtil

Enumerations

enum class  lmms::PathUtil::Base {
  lmms::PathUtil::Absolute , lmms::PathUtil::ProjectDir , lmms::PathUtil::FactoryProjects , lmms::PathUtil::FactorySample ,
  lmms::PathUtil::UserSample , lmms::PathUtil::UserVST , lmms::PathUtil::Preset , lmms::PathUtil::FactoryPresets ,
  lmms::PathUtil::UserLADSPA , lmms::PathUtil::DefaultLADSPA , lmms::PathUtil::UserSoundfont , lmms::PathUtil::DefaultSoundfont ,
  lmms::PathUtil::UserGIG , lmms::PathUtil::DefaultGIG , lmms::PathUtil::LocalDir
}

Functions

QString lmms::PathUtil::baseLocation (const Base base, bool *error)
QDir lmms::PathUtil::baseQDir (const Base base, bool *error)
QString lmms::PathUtil::basePrefix (const Base base)
 Return the prefix used to denote this base in path strings.
Base lmms::PathUtil::baseLookup (const QString &input)
QString lmms::PathUtil::stripPrefix (const QString &input)
 Remove the prefix from a path, iff there is one.
QString lmms::PathUtil::cleanName (const QString &input)
 Get the filename for a path, handling prefixed paths correctly.
QString lmms::PathUtil::oldRelativeUpgrade (const QString &input)
 Upgrade prefix-less relative paths to the new format.
QString lmms::PathUtil::toAbsolute (const QString &input, bool *error)
QString lmms::PathUtil::relativeOrAbsolute (const QString &input, const Base base)
 Make this path relative to a given base, return an absolute path if that fails.
QString lmms::PathUtil::toShortestRelative (const QString &input, bool allowLocal)
auto lmms::PathUtil::stringToPath (std::string_view path) -> std::filesystem::path
 Converts a UTF-8 encoded string to std::filesystem::path.
auto lmms::PathUtil::stringToPath (const QString &path) -> std::filesystem::path
 Converts QString to std::filesystem::path.
auto lmms::PathUtil::pathToString (const std::filesystem::path &path) -> std::string
 Converts std::filesystem::path to a UTF-8 encoded std::string.