Wire up the rest of saving. Save-as will now properly overwrite existing contents.

This commit is contained in:
Paul Chote
2010-12-30 16:11:45 +13:00
parent 39ed6087cb
commit 47bbc3a6de
5 changed files with 95 additions and 38 deletions

View File

@@ -20,7 +20,22 @@ namespace OpenRA.FileFormats
int priority;
public Folder(string path, int priority) { this.path = path; this.priority = priority; }
// Create a new folder package
public Folder(string path, int priority, Dictionary<string, byte[]> contents)
{
this.path = path;
this.priority = priority;
if (Directory.Exists(path))
Directory.Delete(path);
Write(contents);
}
public Folder(string path, int priority)
{
this.path = path;
this.priority = priority;
}
public Stream GetContent(string filename)
{