Exemplo n.º 1
0
 /// <summary>
 /// Saves Metainformations about a PackedFile as xml output
 /// </summary>
 /// <param name="flname">The Filename</param>
 /// <param name="pfd">The description of the File</param>
 protected void SaveMetaInfo(string flname, PackedFileDescriptor pfd)
 {
     System.IO.TextWriter fs = System.IO.File.CreateText(flname);
     try
     {
         fs.WriteLine("<?xml version=\"1.0\" encoding=\"" + fs.Encoding.HeaderName + "\" ?>");
         fs.WriteLine("<package type=\"" + ((uint)Header.IndexType).ToString() + "\">");
         fs.Write(pfd.GenerateXmlMetaInfo());
         fs.WriteLine("</package>");
     }
     finally
     {
         fs.Close();
         fs.Dispose();
         fs = null;
     }
 }