private bool IsConcatenationFile(DirectoryEntry entry)
        {
#if CROSS_PLATFORM
            if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
            {
                return(ConcatenationFileSystem.HasConcatenationFileAttribute(entry.Attributes));
            }
            else
            {
                return(ParentFileSystem.IsConcatenationFile(entry.FullPath));
            }
#else
            return(ConcatenationFileSystem.HasConcatenationFileAttribute(entry.Attributes));
#endif
        }
Beispiel #2
0
        public int GetEntryCount()
        {
            int count = 0;

            foreach (DirectoryEntry entry in ParentDirectory.Read())
            {
                bool isSplit = ConcatenationFileSystem.HasConcatenationFileAttribute(entry.Attributes);

                if (CanReturnEntry(entry, isSplit))
                {
                    count++;
                }
            }

            return(count);
        }
Beispiel #3
0
        public IEnumerable <DirectoryEntry> Read()
        {
            foreach (DirectoryEntry entry in ParentDirectory.Read())
            {
                bool isSplit = ConcatenationFileSystem.HasConcatenationFileAttribute(entry.Attributes);

                if (!CanReturnEntry(entry, isSplit))
                {
                    continue;
                }

                if (isSplit)
                {
                    entry.Type       = DirectoryEntryType.File;
                    entry.Size       = ParentFileSystem.GetConcatenationFileSize(entry.FullPath);
                    entry.Attributes = NxFileAttributes.None;
                }

                yield return(entry);
            }
        }