internal HFile GetFile(string v, bool allow_creation = false) { foreach (HFile f in files) { if (f.name == v) { return(f); } } if (allow_creation) { HFile f = new HFile(v); files.Add(f); return(f); } return(null); }
internal void RenderTo(HDir hd) { foreach (SnapFile sf in files) { HFile hf = hd.GetFile(sf.name, true); hf.AddInstance(sf); } foreach (SnapDir subsd in dirs) { HDir subhd = hd.GetPath(subsd.name, true); subhd.AddScanned(subsd); subsd.RenderTo(subhd); } if (files.Count + dirs.Count > 0) { hd.AddScanned(this); } }