public override IEnumerable<INode> DoGetChildren(NodeType nodeType, Predicate<INode> acceptNode)
		{
			INode node;
			var files = new List<IFile>();
			var directories = new HashSet<string>();

			Refresh();

			var fileSystem = (ZipFileSystem)this.FileSystem;

			foreach (ZLib.ZipEntry zipEntry in fileSystem.zipFile)
			{
				if (zipEntry.Name.StartsWith(this.ZipPath)  /* Is descendent */
					&& zipEntry.Name.Length != this.ZipPath.Length /* Not self */)
				{
					var x = zipEntry.Name.IndexOf('/', this.ZipPath.Length + 1);

					if (x == -1 /* Is direct descendent File */)
					{
						node = this.FileSystem.ResolveFile(FileSystemManager.SeperatorChar + zipEntry.Name);

						if (acceptNode(node))
						{
							files.Add((IFile)node);
						}
					}
					else if (x <= zipEntry.Name.Length - 1 /* Is direct descendent dir */)
					{
						var s = zipEntry.Name.Substring(0, x);
                            
						directories.Add(s);
					}
				}
			}

			if (nodeType.Equals(NodeType.Directory) || nodeType.Equals(NodeType.Any))
			{
				var sortedDirectories = directories.Sorted(StringComparer.InvariantCultureIgnoreCase);

				foreach (var path in sortedDirectories)
				{
					node = this.FileSystem.ResolveDirectory(FileSystemManager.SeperatorChar + path);

					if (acceptNode(node))
					{
						yield return node;
					}
				}
			}
			
			if (nodeType.Equals(NodeType.File) || nodeType.Equals(NodeType.Any))
			{
				foreach (var file in files)
				{
					yield return file;
				}
			}
		}
        private void GenerateArchive(DateTime startTime, Func<FileSystemObject, Dictionary<Guid, BackupStream>, BackupStream> streamGenerator, int versionNumber = 0)
        {
            var firstStreamId = NextStreamUniqueId;
            var firstDiffId = NextDifferentialChainUniqueId;
            var versionPath = GetVersionPath(versionNumber);
            using (var archive = new ArchiveWriter(versionPath))
            {
                var streamDict = GenerateStreams(streamGenerator);
                var versionDependencies = new HashSet<int>();

                foreach (var kv in streamDict)
                {
                    {
                        var baseObject = BaseObjects[kv.Key];
                        kv.Value.ForEach(x => x.FileSystemObjects.ForEach(y => y.BackupStream = x));
                        baseObject.Iterate(x => GetDependencies(x, versionDependencies));
                    }

                    foreach (var backupStream in kv.Value)
                    {
                        Console.WriteLine(backupStream.FileSystemObjects[0].UnmappedPath);
                        var fso = backupStream.FileSystemObjects[0];
                        var compute = fso.GetHash(HashAlgorithm) == null;
                        var type = compute ? HashAlgorithm : HashType.None;
                        var digest = archive.AddFile(backupStream.UniqueId, fso.OpenForExclusiveRead(), type);
                        if (compute)
                            fso.Hashes[HashAlgorithm] = digest;
                    }
                }

            // ReSharper disable once AccessToDisposedClosure
                streamDict.Keys.ForEach(x => archive.AddFso(BaseObjects[x]));

                archive.AddVersionManifest(new VersionManifest
                {
                    CreationTime = startTime,
                    VersionNumber = versionNumber,
                    EntryCount = BaseObjects.Count,
                    FirstStreamUniqueId = firstStreamId,
                    FirstDifferentialChainUniqueId = firstDiffId,
                    NextStreamUniqueId = NextStreamUniqueId,
                    NextDifferentialChainUniqueId = NextDifferentialChainUniqueId,
                    VersionDependencies = versionDependencies.Sorted().ToList(),
                });
            }
        }