MCPcopy Create free account
hub / github.com/BespokeSynth/BespokeSynth / ofToDataPath

Function ofToDataPath

Source/OpenFrameworksPort.cpp:88–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88std::string ofToDataPath(const std::string& path)
89{
90 if (!path.empty() && (path[0] == '.' || juce::File::isAbsolutePath(path)))
91 return path;
92
93 static const auto sDataDir = []
94 {
95 auto defaultDataDir = juce::File::getSpecialLocation(juce::File::userDocumentsDirectory).getChildFile("BespokeSynth").getFullPathName().toStdString();
96 auto dataDir = juce::SystemStats::getEnvironmentVariable("BESPOKE_DATA_DIR", defaultDataDir).toStdString();
97#if BESPOKE_WINDOWS
98 std::replace(begin(dataDir), end(dataDir), '\\', '/');
99#endif
100 UpdateUserData(dataDir);
101 dataDir += '/';
102 return dataDir;
103 }();
104
105 return sDataDir + path;
106}
107
108std::string ofToFactoryPath(const std::string& subdir)
109{

Callers 15

GetPrefabsMethod · 0.85
GetPresetsMethod · 0.85
OnClickedMethod · 0.85
PluginListWindowMethod · 0.85
CreateUIControlsMethod · 0.85
LoadControllerLayoutMethod · 0.85
FilesDroppedMethod · 0.85
ButtonClickedMethod · 0.85
ButtonClickedMethod · 0.85
SavePrefabMethod · 0.85
LoadPrefabMethod · 0.85
OnWindowClosedMethod · 0.85

Calls 2

UpdateUserDataFunction · 0.85
emptyMethod · 0.80

Tested by

no test coverage detected