protected override void buildSet() { // find all files in a contiguous sequence starting with the selected file string[] name = bf.F.Name.Split('.'); string pattern = name[0]; long size = 0; int counter = 1; if (name[1] == "001") { while (File.Exists(bf.F.DirectoryName + '\\' + name[0] + '.' + counter.ToString().PadLeft(3, '0'))) { // component streams are wrappers for StreamReader ComponentStream sequenceFile = new ComponentStream(bf.F.DirectoryName + '\\' + name[0] + '.' + counter.ToString().PadLeft(3, '0')); fileSet.Add(sequenceFile); size += sequenceFile.F.Length; counter++; } } else { ComponentStream singleDMG = new ComponentStream(bf.F.FullName); fileSet.Add(singleDMG); size = singleDMG.Length; } SetLength(size); }
public absImageStream(string filepath) { bf = new ComponentStream(filepath); this.sectorSize = 512; // default unless identified otherwise }