Mercurial > repos > IBBoard.WarFoundry.API
changeset 318:234b902397e6
Re #324: Add saving of Race and System data to files
* Create zip file
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 05 Mar 2011 15:22:07 +0000 |
parents | 58cd0fa53976 |
children | 7187add280ed |
files | api/Savers/Xml/WarFoundryXmlFileSaver.cs |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/api/Savers/Xml/WarFoundryXmlFileSaver.cs Sat Mar 05 14:58:34 2011 +0000 +++ b/api/Savers/Xml/WarFoundryXmlFileSaver.cs Sat Mar 05 15:22:07 2011 +0000 @@ -1,6 +1,8 @@ using System; using IBBoard.WarFoundry.API.Savers; using IBBoard.WarFoundry.API.Objects; +using ICSharpCode.SharpZipLib.Zip; +using System.IO; namespace IBBoard.WarFoundry.API.Savers.Xml { @@ -10,8 +12,12 @@ { } - public bool Save (string path, params WarFoundryLoadedObject[] objects) + public bool Save(string path, params WarFoundryLoadedObject[] objects) { + ZipFile zipFile = ZipFile.Create(path); + zipFile.BeginUpdate(); + zipFile.CommitUpdate(); + zipFile.Close(); return true; } }