private void RestoreScriptingExamplesIfNeeded() { if (ScriptingDirectory.Contains(SCRIPTING_RAW_DIR) && !Directory.Exists(ScriptingDirectory)) { if (Directory.Exists(GlobalConfig.FullPath(SCRIPTING_RAW_DIR))) { FileSystem.CopyDirectory(GlobalConfig.FullPath(SCRIPTING_RAW_DIR), ScriptingDirectory); } else { throw new FileNotFoundException( $"Scripting examples not found in {GlobalConfig.FullPath(SCRIPTING_RAW_DIR)}"); } } if (CustomFunctionsDirectory.Contains(CUSTOM_FUNCTIONS_RAW_DIR) && !Directory.Exists(CustomFunctionsDirectory)) { if (Directory.Exists(GlobalConfig.FullPath(CUSTOM_FUNCTIONS_RAW_DIR))) { FileSystem.CopyDirectory(GlobalConfig.FullPath(CUSTOM_FUNCTIONS_RAW_DIR), CustomFunctionsDirectory); } else { throw new FileNotFoundException( $"Custom functions examples not found in {GlobalConfig.FullPath(CUSTOM_FUNCTIONS_RAW_DIR)}"); } } }
private void RestoreScriptingExamplesIfNeeded() { if (ScriptingDirectory.Contains(_scriptingRawDir) && !Directory.Exists(ScriptingDirectory)) { if (Directory.Exists(GlobalConfig.FullPath(_scriptingRawDir))) { CopyDirectory.Copy(GlobalConfig.FullPath(_scriptingRawDir), ScriptingDirectory); } else { throw new FileNotFoundException( $"Scripting examples not found in {GlobalConfig.FullPath(_scriptingRawDir)}"); } } if (CustomFunctionsDirectory.Contains(_customFunctionsRawDir) && !Directory.Exists(CustomFunctionsDirectory)) { if (Directory.Exists(GlobalConfig.FullPath(_customFunctionsRawDir))) { CopyDirectory.Copy(GlobalConfig.FullPath(_customFunctionsRawDir), CustomFunctionsDirectory); } else { throw new FileNotFoundException( $"Custom functions examples not found in {GlobalConfig.FullPath(_customFunctionsRawDir)}"); } } }