15 implementations of IDirectoryContents
Microsoft.AspNetCore.Components.Endpoints.Tests (1)
Builder\TestFileProvider\TestDirectoryContent.cs (1)
8public class TestDirectoryContent : IDirectoryContents, IFileInfo
Microsoft.AspNetCore.Components.WebView (1)
src\Shared\StaticWebAssets\ManifestStaticWebAssetFileProvider.cs (1)
239private sealed class StaticWebAssetsDirectoryContents : IDirectoryContents
Microsoft.AspNetCore.Components.WebView.Maui (1)
iOS\iOSMauiAssetFileProvider.cs (1)
59 private sealed class iOSMauiAssetDirectoryContents : IDirectoryContents
Microsoft.AspNetCore.Components.WebView.Test (1)
StaticContentProviderTests.cs (1)
73private sealed class InMemoryDirectoryContents : IDirectoryContents
Microsoft.AspNetCore.Hosting (1)
src\Shared\StaticWebAssets\ManifestStaticWebAssetFileProvider.cs (1)
239private sealed class StaticWebAssetsDirectoryContents : IDirectoryContents
Microsoft.AspNetCore.Hosting.Tests (1)
StaticWebAssets\ManifestStaticWebAssetsFileProviderTests.cs (1)
792internal class TestDirectoryContents : IDirectoryContents
Microsoft.AspNetCore.Mvc.Views.TestCommon (1)
TestDirectoryContent.cs (1)
8public class TestDirectoryContent : IDirectoryContents, IFileInfo
Microsoft.Extensions.Configuration.KeyPerFile.Tests (1)
KeyPerFileTests.cs (1)
486class TestDirectoryContents : IDirectoryContents
Microsoft.Extensions.FileProviders.Abstractions (1)
NotFoundDirectoryContents.cs (1)
13public class NotFoundDirectoryContents : IDirectoryContents
Microsoft.Extensions.FileProviders.Composite (1)
CompositeDirectoryContents.cs (1)
15public class CompositeDirectoryContents : IDirectoryContents
Microsoft.Extensions.FileProviders.Embedded (2)
EnumerableDirectoryContents.cs (1)
11internal sealed class EnumerableDirectoryContents : IDirectoryContents
Manifest\ManifestDirectoryInfo.cs (1)
14internal sealed class ManifestDirectoryInfo : IFileInfo, IDirectoryContents
Microsoft.Extensions.FileProviders.Physical (2)
Internal\PhysicalDirectoryContents.cs (1)
15public class PhysicalDirectoryContents : IDirectoryContents
PhysicalDirectoryInfo.cs (1)
16public class PhysicalDirectoryInfo : IFileInfo, IDirectoryContents
RazorBuildWebSite (1)
UpdateableFileProvider.cs (1)
106private class PagesDirectoryContents : IDirectoryContents
67 references to IDirectoryContents
Microsoft.AspNetCore.Components.Endpoints.Tests (4)
Builder\TestFileProvider\TestFileProvider.cs (4)
12private readonly Dictionary<string, IDirectoryContents> _directoryContentsLookup = 13new Dictionary<string, IDirectoryContents>(); 29public virtual IDirectoryContents GetDirectoryContents(string subpath) 31if (_directoryContentsLookup.TryGetValue(subpath, out var value))
Microsoft.AspNetCore.Components.WebView (1)
src\Shared\StaticWebAssets\ManifestStaticWebAssetFileProvider.cs (1)
40public IDirectoryContents GetDirectoryContents(string subpath)
Microsoft.AspNetCore.Components.WebView.Maui (1)
iOS\iOSMauiAssetFileProvider.cs (1)
23 public IDirectoryContents GetDirectoryContents(string subpath)
Microsoft.AspNetCore.Components.WebView.Test (2)
Infrastructure\TestFileProvider.cs (1)
11public IDirectoryContents GetDirectoryContents(string subpath)
StaticContentProviderTests.cs (1)
55public IDirectoryContents GetDirectoryContents(string subpath)
Microsoft.AspNetCore.Diagnostics.Tests (1)
ExceptionDetailsProviderTest.cs (1)
288public IDirectoryContents GetDirectoryContents(string subpath)
Microsoft.AspNetCore.Hosting (1)
src\Shared\StaticWebAssets\ManifestStaticWebAssetFileProvider.cs (1)
40public IDirectoryContents GetDirectoryContents(string subpath)
Microsoft.AspNetCore.Hosting.Tests (9)
StaticWebAssets\ManifestStaticWebAssetsFileProviderTests.cs (9)
334var contents = fileProvider.GetDirectoryContents(""); 435var contents = fileProvider.GetDirectoryContents(""); 450var contents = fileProvider.GetDirectoryContents("_content/NonExisting"); 465var contents = fileProvider.GetDirectoryContents("_content"); 483var contents = fileProvider.GetDirectoryContents("_content/RazorClassLibrary/js"); 544var directory = provider.GetDirectoryContents(searchDir); 585var directory = provider.GetDirectoryContents(requestedUrl); 599var contents = fileProvider.GetDirectoryContents("_content/RazorClassLibrary"); 643var directory = provider.GetDirectoryContents("/_CONTENT/");
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (2)
FileProviderRazorProjectFileSystem.cs (2)
46private IEnumerable<RazorProjectItem> EnumerateFiles(IDirectoryContents directory, string basePath, string prefix) 55var subDirectory = FileProvider.GetDirectoryContents(JoinPath(basePath, relativePath));
Microsoft.AspNetCore.Mvc.TagHelpers.Test (8)
GlobbingUrlBuilderTest.cs (5)
472private static IDirectoryContents MakeDirectoryContents(FileNode fileNode, Mock<IFileProvider> fileProviderMock) 489var directoryContents = new Mock<IDirectoryContents>(); 495private static IDirectoryContents MakeDirectoryContents(params string[] fileNames) 498var directoryContents = new Mock<IDirectoryContents>(); 504private static IFileProvider MakeFileProvider(IDirectoryContents directoryContents = null)
ImageTagHelperTest.cs (1)
360var emptyDirectoryContents = new Mock<IDirectoryContents>();
LinkTagHelperTest.cs (1)
1170var emptyDirectoryContents = new Mock<IDirectoryContents>();
ScriptTagHelperTest.cs (1)
1137var emptyDirectoryContents = new Mock<IDirectoryContents>();
Microsoft.AspNetCore.Mvc.Views.TestCommon (4)
TestFileProvider.cs (4)
12private readonly Dictionary<string, IDirectoryContents> _directoryContentsLookup = 13new Dictionary<string, IDirectoryContents>(); 29public virtual IDirectoryContents GetDirectoryContents(string subpath) 31if (_directoryContentsLookup.TryGetValue(subpath, out var value))
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (2)
CertificatePathWatcherTests.cs (2)
488IDirectoryContents IFileProvider.GetDirectoryContents(string subpath) => throw new NotSupportedException(); 536IDirectoryContents IFileProvider.GetDirectoryContents(string subpath)
Microsoft.AspNetCore.StaticAssets.Tests (1)
StaticAssetsIntegrationTests.cs (1)
1054public IDirectoryContents GetDirectoryContents(string subpath)
Microsoft.AspNetCore.StaticFiles (3)
DefaultFilesMiddleware.cs (1)
56var dirContents = _fileProvider.GetDirectoryContents(subpath.Value!);
DirectoryBrowserMiddleware.cs (2)
67&& TryGetDirectoryInfo(subpath, out var contents)) 83private bool TryGetDirectoryInfo(PathString subpath, out IDirectoryContents contents)
Microsoft.AspNetCore.StaticFiles.Tests (1)
StaticFileContextTest.cs (1)
157public IDirectoryContents GetDirectoryContents(string subpath)
Microsoft.Extensions.Configuration.KeyPerFile (1)
KeyPerFileConfigurationProvider.cs (1)
74var directory = Source.FileProvider.GetDirectoryContents("/");
Microsoft.Extensions.Configuration.KeyPerFile.Tests (2)
KeyPerFileTests.cs (2)
433IDirectoryContents _contents; 442public IDirectoryContents GetDirectoryContents(string subpath) => _contents;
Microsoft.Extensions.FileProviders.Abstractions (3)
IFileProvider.cs (1)
25IDirectoryContents GetDirectoryContents(string subpath);
NullFileProvider.cs (2)
17/// <returns>A <see cref="IDirectoryContents"/> that does not exist and does not contain any contents.</returns> 18public IDirectoryContents GetDirectoryContents(string subpath) => NotFoundDirectoryContents.Singleton;
Microsoft.Extensions.FileProviders.Composite (5)
CompositeDirectoryContents.cs (4)
21private List<IDirectoryContents>? _directories; 42_directories = new List<IDirectoryContents>(); 45IDirectoryContents directoryContents = fileProvider.GetDirectoryContents(_subPath); 66IDirectoryContents directoryContents = _directories[i];
CompositeFileProvider.cs (1)
64public IDirectoryContents GetDirectoryContents(string subpath)
Microsoft.Extensions.FileProviders.Embedded (2)
EmbeddedFileProvider.cs (1)
137public IDirectoryContents GetDirectoryContents(string subpath)
ManifestEmbeddedFileProvider.cs (1)
83public IDirectoryContents GetDirectoryContents(string subpath)
Microsoft.Extensions.FileProviders.Embedded.Tests (10)
EmbeddedFileProviderTests.cs (3)
209var files = provider.GetDirectoryContents(path); 229var files = provider.GetDirectoryContents(string.Empty); 246var files = provider.GetDirectoryContents(path);
ManifestEmbeddedFileProviderTests.cs (7)
328var contents = provider.GetDirectoryContents("non-existing"); 346var contents = provider.GetDirectoryContents("site.css"); 373var directory = provider.GetDirectoryContents(path); 414Assert.IsAssignableFrom<IDirectoryContents>(root["wwwroot"]); 415Assert.IsAssignableFrom<IDirectoryContents>(root["config"]); 418Assert.Equal(wwwrootExpected, (IDirectoryContents)root["wwwroot"], FileInfoComparer.Instance); 419Assert.Equal(configExpected, (IDirectoryContents)root["config"], FileInfoComparer.Instance);
Microsoft.Extensions.FileProviders.Physical (2)
PhysicalFileProvider.cs (2)
302/// <para>The caller must check the <see cref="IDirectoryContents.Exists"/> property.</para> 306public IDirectoryContents GetDirectoryContents(string subpath)
RazorBuildWebSite (1)
UpdateableFileProvider.cs (1)
31public IDirectoryContents GetDirectoryContents(string subpath)
StaticFilesAuth (1)
Startup.cs (1)
151var dir = files.GetDirectoryContents(path);