| 881 | } |
| 882 | |
| 883 | String 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 | |
| 902 | void ScriptingObjects::ScriptFile::show() |
| 903 | { |