public static Stream ForUpdate(string name, uint diskNumber)
{
string fname =
String.Format("{0}.z{1:D2}",
Path.Combine(Path.GetDirectoryName(name),
Path.GetFileNameWithoutExtension(name)),
diskNumber + 1);
// Console.WriteLine("ZSS: ForUpdate ({0})",
// Path.GetFileName(fname));
// This class assumes that the update will not expand the
// size of the segment. Update is used only for an in-place
// update of zip metadata. It never will try to write beyond
// the end of a segment.
return File.Open(fname,
FileMode.Open,
FileAccess.ReadWrite,
FileShare.None);
}