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

Method getRelativePathFrom

hi_scripting/scripting/api/ScriptingApiObjects.cpp:883–900  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

881}
882
883String ScriptingObjects::ScriptFile::getRelativePathFrom(var otherFile)
884{
885 if (auto sf = dynamic_cast<ScriptFile*>(otherFile.getObject()))
886 {
887 if (!sf->f.isDirectory())
888 reportScriptError("otherFile is not a directory");
889
890 auto rp = f.getRelativePathFrom(sf->f);
891 return rp.replaceCharacter('\\', '/');
892 }
893 else
894 {
895 reportScriptError("otherFile is not a file");
896 }
897
898
899 return {};
900}
901
902void ScriptingObjects::ScriptFile::show()
903{

Callers 15

getCppPathMethod · 0.45
convertToCppTestCodeMethod · 0.45
flushMethod · 0.45
getFilePathMethod · 0.45
writeMethod · 0.45
performTaskStaticMethod · 0.45
exportAsValueTreeMethod · 0.45
getParentUrlMethod · 0.45
addFileRecursiveMethod · 0.45
ItemMethod · 0.45
addContentToValueTreeMethod · 0.45

Calls 3

replaceCharacterMethod · 0.80
getObjectMethod · 0.45
isDirectoryMethod · 0.45

Tested by 2

getCppPathMethod · 0.36
convertToCppTestCodeMethod · 0.36