Esempio n. 1
0
        private void RefreshSaveDir()
        {
            saveDir = new FileHandle(SaveManager.SaveDir);
            nodes   = new SaveGroup();

            AddNodes(saveDir, nodes);
        }
Esempio n. 2
0
        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();
            }
        }