public void Unserialise(Stream s) { Type = (EFSNodeType)s.ReadValue <int>(); Name = s.ReadValue <Tools.ByValStrings.ByValANSIString128>().cstring; Metadata = s.ReadValue <EFSNodeInformation>(); Flags = s.ReadValue <uint>(); int dl = s.ReadValue <int>(); if (dl > 0) { Data = s.ReadNew(dl); } else { Data = null; } int cl = s.ReadValue <int>(); if (cl > 0) { c_list = new List <EFSNode>(); for (int i = 0; i < cl; i++) { EFSNode child = new EFSNode(); child.Unserialise(s); c_list.Add(child); } } else { Children = null; } }
public static EFSNode CreateFromStream(Stream s) { EFSNode n = new EFSNode(); n.Unserialise(s); return(n); }
public EFSNode AddChild(EFSNode n) { if (c_list == null) { c_list = new List <EFSNode>(); } lock (c_list) { int i = c_list.Count; c_list.Add(n); return(c_list[i]); } }
public EmbeddedFilesystem() { root = new EFSNode(EFSNodeType.Folder, "", null); }