Ejemplo n.º 1
0
    private static async IAsyncEnumerable <FileSystemWalkerEntry> EnumerateAllFiles(
        ISingletonFileSystem singletonFileSystem,
        FileHandle rootFileHandle)
    {
        var directoryWalker = new FileSystemDirectoryWalker(singletonFileSystem, rootFileHandle);

        await foreach (var directory in directoryWalker)
        {
            foreach (var entries in directory.Entries)
            {
                yield return(new FileSystemWalkerEntry(entries.FileHandle, entries.Stats, PathLib.Join(directory.Path, entries.Name)));
            }
        }
    }
Ejemplo n.º 2
0
 public FileSystemTests(ISingletonFileSystem singletonFileSystem)
 {
     _singletonFileSystem = singletonFileSystem;
 }
Ejemplo n.º 3
0
 public static IFileSystemWalker CreateGenericWalker(ISingletonFileSystem singletonFileSystem, FileHandle rootFileHandle)
 {
     return(FromEnumerable(rootFileHandle, EnumerateAllFiles(singletonFileSystem, rootFileHandle)));
 }