Stream Closing |
| Ross Killip replied to Drew Miller at 22-May-08 06:42 |
I agree fully with drew - if for instance you want to zip a folder contents using this awesome bit of code, then delete the original files, to ensure the files are not locked by the zipping process (and thus can't be deleted) you need to ensure the ostream is closed, either by adding the line:ostream.Close(); after the oZipStream.Write(obuffer, 0, obuffer.Length); or by using using statements :) Nice code snippet though, cheers. :)
|
|