private void OpenSaveFile(String filename, String path) { if (this.IsOpen()) { Debug.LogError("You are tring to open an already opened save file (" + "\"" + filename + "\")"); return; } try { tree = BplusTreeBytes.Initialize(System.IO.Path.Combine(path, filename + ".save"), System.IO.Path.Combine(path, filename + ".block"), 255); } catch (System.IO.IOException) { try { tree = BplusTreeBytes.ReOpen(System.IO.Path.Combine(path, filename + ".save"), System.IO.Path.Combine(path, filename + ".block")); } catch (System.IO.DirectoryNotFoundException e) { Debug.LogError("Error while opening the save file, check that the specified directory exists\n" + e); return; } catch (System.IO.IOException e) { Debug.LogError("Error while opening the save file, check that save file" + " \"" + filename + "\" " + "is not already open\n" + e); return; } } this.open = true; this.filename = filename; this.path = path; }