Creates directories for zipped files if they do not exist
This commit is contained in:
parent
0802c7120b
commit
f6ced73b9f
@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
@ -23,6 +23,7 @@ namespace Fab2ApprovalSystem.Misc
|
|||||||
/// <param name="folderName"></param>
|
/// <param name="folderName"></param>
|
||||||
public void CreateZip(string outPathname, string folderName) {
|
public void CreateZip(string outPathname, string folderName) {
|
||||||
// TODO Try and Catch block
|
// TODO Try and Catch block
|
||||||
|
Directory.CreateDirectory(Path.GetDirectoryName(outPathname));
|
||||||
|
|
||||||
FileStream fsOut = File.Create(outPathname);
|
FileStream fsOut = File.Create(outPathname);
|
||||||
ZipOutputStream zipStream = new ZipOutputStream(fsOut);
|
ZipOutputStream zipStream = new ZipOutputStream(fsOut);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user