예제 #1
0
        public static void UnpackAll(FileDirectoryTree root, string path)
        {
            foreach (FilePointer filePointer in root.Files)
            {
                if (!filePointer.Name.EndsWith(".dat"))
                {
                    continue;
                }

                var buf = kk.GetFileContentBytes(filePointer);
                if (!Directory.Exists(path))
                {
                    Directory.CreateDirectory(path);
                }
                File.WriteAllBytes(path + "/" + filePointer.Name, buf);
            }
            foreach (FileDirectoryTree item in root.Directories)
            {
                UnpackAll(item, path + "/" + item.DirectoryName);
            }
        }