private string ReadFlashEntry(ResourceEntry entry, XmlWriter resourceXML, string name, string flashDir)
        {
            // Read the resource first; we have the nicety of having the flash name stored
            // in the meta info.
            FlashResource resource = new FlashResource();

            using (var stream = new MemoryStream(entry.Data))
            {
                resource.Deserialize(entry.Version, stream, Endian);
                entry.Data = resource.Data;
            }

            // Since we know that flash will have the filename,
            // we collect it from here instead.
            if (string.IsNullOrEmpty(name))
            {
                name = resource.FileName;
            }

            string[] dirs = name.Split('/');

            string newPath = flashDir;

            for (int z = 0; z != dirs.Length - 1; z++)
            {
                newPath += "/" + dirs[z];
                Directory.CreateDirectory(newPath);
            }

            newPath += "/" + dirs[dirs.Length - 1];
            resourceXML.WriteElementString("File", name);
            resourceXML.WriteElementString("Name", resource.Name);

            // In this case this is valid; we will no doubt get a name.
            return(name);
        }