Beispiel #1
0
        public static EFSNodeInformation CreateNew()
        {
            EFSNodeInformation n = new EFSNodeInformation();

            n.TimeCreatedUTC = n.TimeModifiedUTC = DateTime.UtcNow;
            return(n);
        }
Beispiel #2
0
        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;
            }
        }
Beispiel #3
0
 public EFSNode(EFSNodeType t, string name, byte[] data, EFSNodeInformation meta)
 {
     c_list   = null;
     Type     = t;
     Metadata = meta;
     Name     = name;
     Data     = data;
     Flags    = 0;
 }
Beispiel #4
0
 public EFSNode(EFSNodeType t, string name, byte[] data) : this(t, name, data, EFSNodeInformation.CreateNew())
 {
 }