Exemplo n.º 1
0
 // ReSharper disable once UnusedMember.Local -- needed to init subentries
 private FATBEntry()
 {
     SubEntries = new FATBSubEntry[32];
     for (int i = 0; i < SubEntries.Length; i++)
     {
         SubEntries[i] = new FATBSubEntry();
     }
 }
Exemplo n.º 2
0
        private FATBEntry()
        {
            var sub = SubEntries = new FATBSubEntry[32];

            for (int i = 0; i < sub.Length; i++)
            {
                sub[i] = new FATBSubEntry();
            }
        }
Exemplo n.º 3
0
        public FATBEntry(IEnumerable <string> files) : this()
        {
            IsFolder = true;
            Vector   = 0;
            foreach (var f in files)
            {
                var fn = Path.GetFileNameWithoutExtension(f);
                if (!int.TryParse(fn, out var val) || val >= SubEntries.Length)
                {
                    continue;
                }
                if (FATBSubEntry.GetFileNumber(val) != fn)
                {
                    continue;
                }

                Vector |= (uint)(1 << val);

                SubEntries[val].Exists = true;
                SubEntries[val].File   = f;
            }
        }