Esempio n. 1
0
        private static void ExportToPath(StackContainer container, string path)
        {
            if (!Directory.Exists(path))
            {
                Directory.CreateDirectory(path).Refresh();
            }

            foreach (string value in container.GetValueNames())
            {
                File.WriteAllBytes(Path.Combine(path, value), container.ReadValue(value));
            }

            foreach (string sub in container.GetContainerNames())
            {
                if (sub == "..")
                {
                    continue;
                }

                string subpath = Path.Combine(path, sub);
                container.OpenContainer(sub, false);
                ExportToPath(container, subpath);
                container.Back();
            }
        }