MCPcopy Create free account
hub / github.com/christophhart/HISE / fromReferenceString

Method fromReferenceString

hi_scripting/scripting/api/ScriptingApi.cpp:7141–7160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7139}
7140
7141juce::var ScriptingApi::FileSystem::fromReferenceString(String referenceStringOrFullPath, var locationType)
7142{
7143 auto sub = getSubdirectory(locationType);
7144
7145 PoolReference ref(getScriptProcessor()->getMainController_(), referenceStringOrFullPath, sub);
7146
7147 // also return a file object for missing files...
7148 if(ref.isAbsoluteFile())
7149 {
7150 return var(new ScriptingObjects::ScriptFile(getScriptProcessor(), File(referenceStringOrFullPath)));
7151 }
7152
7153 if ((ref.isValid()) && !ref.isEmbeddedReference())
7154 {
7155 auto f = ref.getFile();
7156 return var(new ScriptingObjects::ScriptFile(getScriptProcessor(), File(f)));
7157 }
7158
7159 return {};
7160}
7161
7162var ScriptingApi::FileSystem::findFiles(var directory, String wildcard, bool recursive)
7163{

Callers

nothing calls this directly

Calls 7

varFunction · 0.85
FileClass · 0.85
getMainController_Method · 0.80
isAbsoluteFileMethod · 0.80
isEmbeddedReferenceMethod · 0.80
isValidMethod · 0.45
getFileMethod · 0.45

Tested by

no test coverage detected