private void RefreshSaveDir() { saveDir = new FileHandle(SaveManager.SaveDir); nodes = new SaveGroup(); AddNodes(saveDir, nodes); }
private void AddNodes(FileHandle dir, SaveGroup group) { foreach (var d in dir.ListDirectoryHandles()) { var node = new SaveGroup { FullPath = d.FullPath, Name = d.Name }; group.Dirs.Add(node); AddNodes(d, node); } foreach (var f in dir.ListFileHandles()) { var node = new SaveData { FullPath = f.FullPath, Name = f.Name }; group.Files.Add(node); node.Load(); } }