27 implementations of IFileInfo
Microsoft.AspNetCore.Components.Endpoints.Tests (3)
Builder\TestFileProvider\TestDirectoryContent.cs (1)
8public class TestDirectoryContent : IDirectoryContents, IFileInfo
Builder\TestFileProvider\TestFileInfo.cs (1)
8public class TestFileInfo : IFileInfo
Builder\TestFileProvider\TestFileProvider.cs (1)
124private sealed class NotFoundFileInfo : IFileInfo
Microsoft.AspNetCore.Components.WebView (2)
src\Shared\StaticWebAssets\ManifestStaticWebAssetFileProvider.cs (2)
253private sealed class StaticWebAssetsDirectoryInfo : IFileInfo 277private sealed class StaticWebAssetsFileInfo : IFileInfo
Microsoft.AspNetCore.Components.WebView.Maui (1)
iOS\iOSMauiAssetFileProvider.cs (1)
32 private sealed class iOSMauiAssetFileInfo : IFileInfo
Microsoft.AspNetCore.Components.WebView.Test (1)
StaticContentProviderTests.cs (1)
102private sealed class InMemoryFileInfo : IFileInfo
Microsoft.AspNetCore.Diagnostics.Tests (1)
ExceptionDetailsProviderTest.cs (1)
304private class TestFileInfo : IFileInfo
Microsoft.AspNetCore.Hosting (2)
src\Shared\StaticWebAssets\ManifestStaticWebAssetFileProvider.cs (2)
253private sealed class StaticWebAssetsDirectoryInfo : IFileInfo 277private sealed class StaticWebAssetsFileInfo : IFileInfo
Microsoft.AspNetCore.Hosting.Tests (1)
StaticWebAssets\ManifestStaticWebAssetsFileProviderTests.cs (1)
775internal class TestFileInfo : IFileInfo
Microsoft.AspNetCore.Mvc.Views.TestCommon (4)
TestDirectoryContent.cs (1)
8public class TestDirectoryContent : IDirectoryContents, IFileInfo
TestDirectoryFileInfo.cs (1)
6public class TestDirectoryFileInfo : IFileInfo
TestFileInfo.cs (1)
8public class TestFileInfo : IFileInfo
TestFileProvider.cs (1)
124private sealed class NotFoundFileInfo : IFileInfo
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
CertificatePathWatcherTests.cs (1)
556private sealed class MockFileInfo : IFileInfo
Microsoft.AspNetCore.StaticFiles.Tests (2)
StaticFileContextTest.cs (2)
177private class NotFoundFileInfo : IFileInfo 234private sealed class TestFileInfo : IFileInfo
Microsoft.Extensions.Configuration.KeyPerFile.Tests (1)
KeyPerFileTests.cs (1)
503class TestFile : IFileInfo
Microsoft.Extensions.FileProviders.Abstractions (1)
NotFoundFileInfo.cs (1)
13public class NotFoundFileInfo : IFileInfo
Microsoft.Extensions.FileProviders.Embedded (3)
EmbeddedResourceFileInfo.cs (1)
13public class EmbeddedResourceFileInfo : IFileInfo
Manifest\ManifestDirectoryInfo.cs (1)
14internal sealed class ManifestDirectoryInfo : IFileInfo, IDirectoryContents
Manifest\ManifestFileInfo.cs (1)
11internal sealed class ManifestFileInfo : IFileInfo
Microsoft.Extensions.FileProviders.Embedded.Tests (1)
TestFileInfo.cs (1)
9internal class TestFileInfo : IFileInfo
Microsoft.Extensions.FileProviders.Physical (2)
PhysicalDirectoryInfo.cs (1)
16public class PhysicalDirectoryInfo : IFileInfo, IDirectoryContents
PhysicalFileInfo.cs (1)
12public class PhysicalFileInfo : IFileInfo
RazorBuildWebSite (1)
UpdateableFileProvider.cs (1)
80private class TestFileInfo : IFileInfo
273 references to IFileInfo
Microsoft.AspNetCore.Components.Endpoints.Tests (9)
Builder\TestFileProvider\TestDirectoryContent.cs (3)
10private readonly IEnumerable<IFileInfo> _files; 12public TestDirectoryContent(string name, IEnumerable<IFileInfo> files) 35public IEnumerator<IFileInfo> GetEnumerator() => _files.GetEnumerator();
Builder\TestFileProvider\TestFileProvider.cs (6)
10private readonly Dictionary<string, IFileInfo> _lookup = 11new Dictionary<string, IFileInfo>(StringComparer.Ordinal); 54public TestDirectoryContent AddDirectoryContent(string path, IEnumerable<IFileInfo> files) 61public void AddFile(string path, IFileInfo contents) 71public virtual IFileInfo GetFileInfo(string subpath) 73if (_lookup.TryGetValue(subpath, out var fileInfo))
Microsoft.AspNetCore.Components.Server (1)
Circuits\CircuitOptionsJavaScriptInitializersConfiguration.cs (1)
21var file = _environment.WebRootFileProvider.GetFileInfo($"{_environment.ApplicationName}.modules.json");
Microsoft.AspNetCore.Components.WebAssembly.Server.Tests (2)
ContentEncodingNegotiatorTests.cs (2)
215var gzMock = new Mock<IFileInfo>(); 217var brMock = new Mock<IFileInfo>();
Microsoft.AspNetCore.Components.WebView (22)
src\Shared\StaticWebAssets\ManifestStaticWebAssetFileProvider.cs (21)
20private static readonly IEqualityComparer<IFileInfo> _nameComparer = new FileNameComparer(); 53HashSet<IFileInfo>? files = null; 83return new StaticWebAssetsDirectoryContents((files as IEnumerable<IFileInfo>) ?? Array.Empty<IFileInfo>()); 86HashSet<IFileInfo>? GetFilesForCandidatePatterns(string[] segments, StaticWebAssetNode? candidate, HashSet<IFileInfo>? files) 97foreach (var result in contentRoot.GetDirectoryContents(candidateDirectoryPath)) 119void GetCandidateFilesForNode(StaticWebAssetNode candidate, HashSet<IFileInfo> files) 138var file = _fileProviders[match.ContentRoot].GetFileInfo(match.Path); 154public IFileInfo GetFileInfo(string subpath) 188var file = _fileProviders[match.ContentRoot].GetFileInfo(match.Path); 216var result = _fileProviders[pattern.ContentRoot].GetFileInfo(candidatePath); 241private readonly IEnumerable<IFileInfo> _files; 243public StaticWebAssetsDirectoryContents(IEnumerable<IFileInfo> files) => 248public IEnumerator<IFileInfo> GetEnumerator() => _files.GetEnumerator(); 279private readonly IFileInfo _source; 281public StaticWebAssetsFileInfo(string name, IFileInfo source) 301private sealed class FileNameComparer : IEqualityComparer<IFileInfo> 303public bool Equals(IFileInfo? x, IFileInfo? y) => string.Equals(x?.Name, y?.Name, _fsComparison); 305public int GetHashCode(IFileInfo obj) => obj.Name.GetHashCode(_fsComparison);
StaticContentProvider.cs (1)
69var fileInfo = _fileProvider.GetFileInfo(relativePath);
Microsoft.AspNetCore.Components.WebView.Maui (2)
iOS\iOSMauiAssetFileProvider.cs (2)
26 public IFileInfo GetFileInfo(string subpath) 67 public IEnumerator<IFileInfo> GetEnumerator()
Microsoft.AspNetCore.Components.WebView.Test (3)
Infrastructure\TestFileProvider.cs (1)
16public IFileInfo GetFileInfo(string subpath)
StaticContentProviderTests.cs (2)
60public IFileInfo GetFileInfo(string subpath) 86public IEnumerator<IFileInfo> GetEnumerator()
Microsoft.AspNetCore.Diagnostics (2)
src\Shared\StackTrace\ExceptionDetails\ExceptionDetailsProvider.cs (2)
117var fileInfo = _fileProvider.GetFileInfo(stackFrame.File); 170private static IEnumerable<string> ReadLines(IFileInfo fileInfo)
Microsoft.AspNetCore.Diagnostics.Tests (1)
ExceptionDetailsProviderTest.cs (1)
293public IFileInfo GetFileInfo(string subpath)
Microsoft.AspNetCore.Hosting (23)
src\Shared\StackTrace\ExceptionDetails\ExceptionDetailsProvider.cs (2)
117var fileInfo = _fileProvider.GetFileInfo(stackFrame.File); 170private static IEnumerable<string> ReadLines(IFileInfo fileInfo)
src\Shared\StaticWebAssets\ManifestStaticWebAssetFileProvider.cs (21)
20private static readonly IEqualityComparer<IFileInfo> _nameComparer = new FileNameComparer(); 53HashSet<IFileInfo>? files = null; 83return new StaticWebAssetsDirectoryContents((files as IEnumerable<IFileInfo>) ?? Array.Empty<IFileInfo>()); 86HashSet<IFileInfo>? GetFilesForCandidatePatterns(string[] segments, StaticWebAssetNode? candidate, HashSet<IFileInfo>? files) 97foreach (var result in contentRoot.GetDirectoryContents(candidateDirectoryPath)) 119void GetCandidateFilesForNode(StaticWebAssetNode candidate, HashSet<IFileInfo> files) 138var file = _fileProviders[match.ContentRoot].GetFileInfo(match.Path); 154public IFileInfo GetFileInfo(string subpath) 188var file = _fileProviders[match.ContentRoot].GetFileInfo(match.Path); 216var result = _fileProviders[pattern.ContentRoot].GetFileInfo(candidatePath); 241private readonly IEnumerable<IFileInfo> _files; 243public StaticWebAssetsDirectoryContents(IEnumerable<IFileInfo> files) => 248public IEnumerator<IFileInfo> GetEnumerator() => _files.GetEnumerator(); 279private readonly IFileInfo _source; 281public StaticWebAssetsFileInfo(string name, IFileInfo source) 301private sealed class FileNameComparer : IEqualityComparer<IFileInfo> 303public bool Equals(IFileInfo? x, IFileInfo? y) => string.Equals(x?.Name, y?.Name, _fsComparison); 305public int GetHashCode(IFileInfo obj) => obj.Name.GetHashCode(_fsComparison);
Microsoft.AspNetCore.Hosting.Tests (14)
StaticWebAssets\ManifestStaticWebAssetsFileProviderTests.cs (14)
47var file = provider.GetFileInfo("/_CONTENT/Microsoft.AspNetCore.Hosting.StaticWebAssets.xml"); 115var file = provider.GetFileInfo(path); 192var file = provider.GetFileInfo(path); 268var file = provider.GetFileInfo(path); 284var file = fileProvider.GetFileInfo("_content/RazorClassLibrary/file.version.js"); 300var file = fileProvider.GetFileInfo(""); 317var file = fileProvider.GetFileInfo("/other.html"); 339var file = contents.Single(); 353var file = fileProvider.GetFileInfo("_content/RazorClassLibrary/js/project-transitive-dep.js"); 404var file = fileProvider.GetFileInfo("_content/RazorClassLibrary/styles.css"); 419var file = fileProvider.GetFileInfo("_content/RazorClassLibrary/different"); 794private readonly IEnumerable<IFileInfo> _contents; 796public TestDirectoryContents(IEnumerable<IFileInfo> contents) 803public IEnumerator<IFileInfo> GetEnumerator() => _contents.GetEnumerator();
Microsoft.AspNetCore.Http.Extensions (3)
SendFileResponseExtensions.cs (3)
25public static Task SendFileAsync(this HttpResponse response, IFileInfo file, CancellationToken cancellationToken = default) 43public static Task SendFileAsync(this HttpResponse response, IFileInfo file, long offset, long? count, CancellationToken cancellationToken = default) 85private static async Task SendFileAsyncCore(HttpResponse response, IFileInfo file, long offset, long? count, CancellationToken cancellationToken)
Microsoft.AspNetCore.Http.Results (4)
VirtualFileHttpResult.cs (4)
108var fileInfo = GetFileInformation(hostingEnvironment.WebRootFileProvider); 135private static Task ExecuteCoreAsync(HttpContext httpContext, RangeItemHeaderValue? range, long rangeLength, IFileInfo fileInfo) 152internal IFileInfo GetFileInformation(IFileProvider fileProvider) 160var fileInfo = fileProvider.GetFileInfo(normalizedPath);
Microsoft.AspNetCore.Http.Results.Tests (3)
src\Shared\ResultsTests\VirtualFileResultTestBase.cs (3)
445var nonDiskFileInfo = new Mock<IFileInfo>(); 469var fileInfo = new Mock<IFileInfo>(); 510var fileInfo = new Mock<IFileInfo>();
Microsoft.AspNetCore.Mvc.Core (6)
Infrastructure\VirtualFileResultExecutor.cs (6)
39var fileInfo = GetFileInformation(result, _hostingEnvironment); 66protected virtual Task WriteFileAsync(ActionContext context, VirtualFileResult result, IFileInfo fileInfo, RangeItemHeaderValue? range, long rangeLength) 76IFileInfo fileInfo, 105internal static IFileInfo GetFileInformation(VirtualFileResult result, IWebHostEnvironment hostingEnvironment) 119var fileInfo = fileProvider.GetFileInfo(normalizedPath); 140protected virtual Stream GetFileStream(IFileInfo fileInfo)
Microsoft.AspNetCore.Mvc.Core.Test (3)
src\Shared\ResultsTests\VirtualFileResultTestBase.cs (3)
445var nonDiskFileInfo = new Mock<IFileInfo>(); 469var fileInfo = new Mock<IFileInfo>(); 510var fileInfo = new Mock<IFileInfo>();
Microsoft.AspNetCore.Mvc.Razor (2)
Infrastructure\DefaultFileVersionProvider.cs (2)
61var fileInfo = FileProvider.GetFileInfo(resolvedPath); 87private static string GetHashForFile(IFileInfo fileInfo)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (6)
FileProviderRazorProjectFileSystem.cs (2)
35var fileInfo = FileProvider.GetFileInfo(path); 50foreach (var fileInfo in directory)
FileProviderRazorProjectItem.cs (4)
25public FileProviderRazorProjectItem(IFileInfo fileInfo, string basePath, string filePath, string root) : this(fileInfo, basePath, filePath, root, fileKind: null) 37public FileProviderRazorProjectItem(IFileInfo fileInfo, string basePath, string filePath, string root, string? fileKind) 47/// The <see cref="IFileInfo"/>. 49public IFileInfo FileInfo { get; }
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (13)
FileProviderRazorProjectFileSystemTest.cs (13)
20fileProvider.AddDirectoryContent("/", new IFileInfo[] { file1, file2 }); 39fileProvider.AddDirectoryContent("/", new IFileInfo[] { file1, file2, file3 }); 79fileProvider.AddDirectoryContent("/", new IFileInfo[] { directory1, file1, directory2 }); 88fileProvider.AddDirectoryContent("/Level1-Dir1", new IFileInfo[] { file2, directory3, file3, file4 }); 90fileProvider.AddDirectoryContent("/Level1-Dir2", new IFileInfo[] { file5 }); 91fileProvider.AddDirectoryContent("/Level1/Level2", new IFileInfo[0]); 144fileProvider.AddDirectoryContent("/", new IFileInfo[] { directory1, file1, directory2 }); 153fileProvider.AddDirectoryContent("/Level1-Dir1", new IFileInfo[] { file2, directory3, file3, file4 }); 155fileProvider.AddDirectoryContent("/Level1-Dir2", new IFileInfo[] { file5 }); 156fileProvider.AddDirectoryContent("/Level1/Level2", new IFileInfo[0]); 188fileProvider.AddDirectoryContent("/", new IFileInfo[] { file1, file2, file3 }); 210fileProvider.AddDirectoryContent("/", new IFileInfo[] { file1, file2, file3 }); 231fileProvider.AddDirectoryContent("/", new IFileInfo[] { file });
Microsoft.AspNetCore.Mvc.TagHelpers (5)
FileProviderGlobbingDirectory.cs (4)
13private readonly IFileInfo _fileInfo; 19IFileInfo fileInfo, 68foreach (var fileInfo in _fileProvider.GetDirectoryContents(RelativePath)) 84private FileSystemInfoBase BuildFileResult(IFileInfo fileInfo)
FileProviderGlobbingFile.cs (1)
13public FileProviderGlobbingFile(IFileInfo fileInfo, DirectoryInfoBase parent)
Microsoft.AspNetCore.Mvc.TagHelpers.Test (12)
DefaultFileVersionProviderTest.cs (3)
174var mockFile = new Mock<IFileInfo>(); 305var existingMockFile = new Mock<IFileInfo>(); 311var doesNotExistMockFile = new Mock<IFileInfo>();
GlobbingUrlBuilderTest.cs (3)
448private static IFileInfo MakeFileInfo(string name, bool isDirectory = false) 450var fileInfo = new Mock<IFileInfo>(); 474var children = new List<IFileInfo>();
ImageTagHelperTest.cs (2)
362.Returns(Enumerable.Empty<IFileInfo>().GetEnumerator()); 363var mockFile = new Mock<IFileInfo>();
LinkTagHelperTest.cs (2)
1172.Returns(Enumerable.Empty<IFileInfo>().GetEnumerator()); 1173var mockFile = new Mock<IFileInfo>();
ScriptTagHelperTest.cs (2)
1139.Returns(Enumerable.Empty<IFileInfo>().GetEnumerator()); 1140var mockFile = new Mock<IFileInfo>();
Microsoft.AspNetCore.Mvc.Views.TestCommon (9)
TestDirectoryContent.cs (3)
10private readonly IEnumerable<IFileInfo> _files; 12public TestDirectoryContent(string name, IEnumerable<IFileInfo> files) 35public IEnumerator<IFileInfo> GetEnumerator() => _files.GetEnumerator();
TestFileProvider.cs (6)
10private readonly Dictionary<string, IFileInfo> _lookup = 11new Dictionary<string, IFileInfo>(StringComparer.Ordinal); 54public TestDirectoryContent AddDirectoryContent(string path, IEnumerable<IFileInfo> files) 61public void AddFile(string path, IFileInfo contents) 71public virtual IFileInfo GetFileInfo(string subpath) 73if (_lookup.TryGetValue(subpath, out var fileInfo))
Microsoft.AspNetCore.Rewrite (3)
ApacheModRewriteOptionsExtensions.cs (1)
25var fileInfo = fileProvider.GetFileInfo(filePath);
IISUrlRewriteOptionsExtensions.cs (1)
29var file = fileProvider.GetFileInfo(filePath);
UrlMatches\FileSizeMatch.cs (1)
15var fileInfo = context.StaticFileProvider.GetFileInfo(input);
Microsoft.AspNetCore.Server.IIS (2)
src\Shared\StackTrace\ExceptionDetails\ExceptionDetailsProvider.cs (2)
117var fileInfo = _fileProvider.GetFileInfo(stackFrame.File); 170private static IEnumerable<string> ReadLines(IFileInfo fileInfo)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (9)
CertificatePathWatcherTests.cs (9)
489IFileInfo IFileProvider.GetFileInfo(string subpath) => throw new NotSupportedException(); 541IFileInfo IFileProvider.GetFileInfo(string subpath) 565bool IFileInfo.Exists => _lastModifiedTime.HasValue; 566DateTimeOffset IFileInfo.LastModified => _lastModifiedTime.GetValueOrDefault(); 568long IFileInfo.Length => throw new NotSupportedException(); 569string IFileInfo.PhysicalPath => throw new NotSupportedException(); 570string IFileInfo.Name => throw new NotSupportedException(); 571bool IFileInfo.IsDirectory => throw new NotSupportedException(); 572Stream IFileInfo.CreateReadStream() => throw new NotSupportedException();
Microsoft.AspNetCore.StaticAssets (7)
Development\StaticAssetDevelopmentRuntimeHandler.cs (4)
44var fileInfo = context.RequestServices.GetRequiredService<IWebHostEnvironment>().WebRootFileProvider.GetFileInfo(asset.AssetPath); 60internal static string GetETag(IFileInfo fileInfo) 95var fileInfo = _context.RequestServices.GetRequiredService<IWebHostEnvironment>().WebRootFileProvider.GetFileInfo(_asset.AssetPath); 209var fileInfo = environment.WebRootFileProvider.GetFileInfo(ctx.Request.Path);
StaticAssetsInvoker.cs (3)
30private IFileInfo? _fileInfo; 84public IFileInfo FileInfo => _fileInfo ??= 85_fileProvider.GetFileInfo(_resource.AssetPath) is IFileInfo file and { Exists: true } ?
Microsoft.AspNetCore.StaticAssets.Tests (2)
StaticAssetsIntegrationTests.cs (2)
1059public IFileInfo GetFileInfo(string subpath) 1077private class TestFileInfo(TestResource testResource) : IFileInfo
Microsoft.AspNetCore.StaticFiles (8)
DefaultFilesMiddleware.cs (1)
63var file = _fileProvider.GetFileInfo(subpath.Value + defaultFile);
HtmlDirectoryFormatter.cs (3)
35public virtual Task GenerateContentAsync(HttpContext context, IEnumerable<IFileInfo> contents) 129foreach (var subdir in contents.Where(info => info.IsDirectory)) 165foreach (var file in contents.Where(info => !info.IsDirectory))
IDirectoryFormatter.cs (1)
19Task GenerateContentAsync(HttpContext context, IEnumerable<IFileInfo> contents);
StaticFileContext.cs (1)
27private IFileInfo _fileInfo;
StaticFileResponseContext.cs (2)
19public StaticFileResponseContext(HttpContext context, IFileInfo file) 33public IFileInfo File { get; }
Microsoft.AspNetCore.StaticFiles.FunctionalTests (3)
FallbackStaticFileTest.cs (1)
124var fileInfo = environment.WebRootFileProvider.GetFileInfo(filePath);
StaticFileMiddlewareTests.cs (2)
158var fileInfo = hostingEnvironment.WebRootFileProvider.GetFileInfo(Path.GetFileName(requestUrl)); 200var fileInfo = hostingEnvironment.WebRootFileProvider.GetFileInfo(Path.GetFileName(requestUrl));
Microsoft.AspNetCore.StaticFiles.Tests (12)
StaticFileContextTest.cs (5)
150private readonly Dictionary<string, IFileInfo> _files = new Dictionary<string, IFileInfo>(StringComparer.Ordinal); 152public void AddFile(string path, IFileInfo fileInfo) 162public IFileInfo GetFileInfo(string subpath) 164if (_files.TryGetValue(subpath, out var result))
StaticFileMiddlewareTests.cs (7)
128var fileInfo = fileProvider.GetFileInfo("TestDocument.txt"); 185var fileInfo = fileProvider.GetFileInfo(Path.GetFileName(requestUrl)); 224var fileInfo = fileProvider.GetFileInfo(Path.GetFileName(requestUrl)); 266var fileInfo = fileProvider.GetFileInfo(Path.GetFileName(requestUrl)); 316var fileInfo = fileProvider.GetFileInfo(Path.GetFileName(requestUrl)); 359var fileInfo = fileProvider.GetFileInfo(Path.GetFileName(requestUrl)); 478var fileInfo = fileProvider.GetFileInfo(Path.GetFileName(requestUrl));
Microsoft.Extensions.Configuration.FileExtensions (2)
FileConfigurationProvider.cs (2)
58IFileInfo? file = Source.FileProvider?.GetFileInfo(Source.Path ?? string.Empty); 77static Stream OpenRead(IFileInfo fileInfo)
Microsoft.Extensions.Configuration.KeyPerFile (1)
KeyPerFileConfigurationProvider.cs (1)
87foreach (var file in directory)
Microsoft.Extensions.Configuration.KeyPerFile.Tests (9)
ConfigurationProviderCommandLineTest.cs (2)
17var testFiles = new List<IFileInfo>(); 30private void SectionToTestFiles(List<IFileInfo> testFiles, string sectionName, TestSection section)
KeyPerFileTests.cs (7)
436public TestFileProvider(params IFileInfo[] files) 444public IFileInfo GetFileInfo(string subpath) => new TestFile("TestDirectory"); 448internal void ChangeFiles(params IFileInfo[] files) 488List<IFileInfo> _list; 490public TestDirectoryContents(params IFileInfo[] files) 492_list = new List<IFileInfo>(files); 497public IEnumerator<IFileInfo> GetEnumerator() => _list.GetEnumerator();
Microsoft.Extensions.FileProviders.Abstractions (6)
IDirectoryContents.cs (1)
11public interface IDirectoryContents : IEnumerable<IFileInfo>
IFileProvider.cs (1)
18IFileInfo GetFileInfo(string subpath);
NotFoundDirectoryContents.cs (2)
27public IEnumerator<IFileInfo> GetEnumerator() => Enumerable.Empty<IFileInfo>().GetEnumerator();
NullFileProvider.cs (2)
24/// <returns>A <see cref="IFileInfo"/> representing a nonexistent file at the given path.</returns> 25public IFileInfo GetFileInfo(string subpath) => new NotFoundFileInfo(subpath);
Microsoft.Extensions.FileProviders.Composite (10)
CompositeDirectoryContents.cs (4)
19private List<IFileInfo>? _files; 62_files = new List<IFileInfo>(); 67foreach (IFileInfo file in directoryContents) 83public IEnumerator<IFileInfo> GetEnumerator()
CompositeFileProvider.cs (6)
43/// <returns>The file information. The caller must check the <see cref="IFileInfo.Exists" /> property. This is the first existing <see cref="IFileInfo"/> returned by the provided <see cref="IFileProvider"/> or a not found <see cref="IFileInfo"/> if no existing files are found.</returns> 44public IFileInfo GetFileInfo(string subpath) 48IFileInfo fileInfo = fileProvider.GetFileInfo(subpath); 63/// When there are multiple <see cref="IFileInfo"/> objects with the same Name property, only the first one is included in the results.</returns>
Microsoft.Extensions.FileProviders.Embedded (15)
EmbeddedFileProvider.cs (2)
82public IFileInfo GetFileInfo(string subpath) 151var entries = new List<IFileInfo>();
EnumerableDirectoryContents.cs (3)
13private readonly IEnumerable<IFileInfo> _entries; 15public EnumerableDirectoryContents(IEnumerable<IFileInfo> entries) 27public IEnumerator<IFileInfo> GetEnumerator()
Manifest\ManifestDirectoryInfo.cs (7)
16private IFileInfo[]? _entries; 47public IEnumerator<IFileInfo> GetEnumerator() 51IEnumerable<IFileInfo> EnsureEntries() => _entries ??= ResolveEntries().ToArray(); 53IEnumerable<IFileInfo> ResolveEntries() 57return Array.Empty<IFileInfo>(); 60var entries = new List<IFileInfo>(); 64IFileInfo fileInfo = entry switch
ManifestEmbeddedFileProvider.cs (3)
45/// <param name="lastModified">The LastModified date to use on the <see cref="IFileInfo"/> instances 58/// <param name="lastModified">The LastModified date to use on the <see cref="IFileInfo"/> instances 100public IFileInfo GetFileInfo(string subpath)
Microsoft.Extensions.FileProviders.Embedded.Tests (27)
EmbeddedFileProviderTests.cs (7)
29var fileInfo = provider.GetFileInfo("DoesNotExist.Txt"); 46var fileInfo = provider.GetFileInfo(filePath); 65var fileInfo = provider.GetFileInfo("File.txt"); 79var fileInfo = provider.GetFileInfo("\\File.txt"); 112var fileInfo = provider.GetFileInfo(path); 150var fileInfo = provider.GetFileInfo(path); 188var fileInfo = provider.GetFileInfo(path);
FileInfoComparer.cs (4)
9internal class FileInfoComparer : IEqualityComparer<IFileInfo> 13public bool Equals(IFileInfo x, IFileInfo y) 32public int GetHashCode(IFileInfo obj) => 0;
ManifestEmbeddedFileProviderTests.cs (16)
28var jqueryValidate = provider.GetFileInfo("jquery.validate.js"); 35var jqueryMin = provider.GetFileInfo("jquery.min.js"); 42var siteCss = provider.GetFileInfo("site.css"); 65var jqueryValidate = provider.GetFileInfo(Path.Combine("wwwroot", "jquery.validate.js")); 72var jqueryMin = provider.GetFileInfo(Path.Combine("wwwroot", "jquery.min.js")); 79var siteCss = provider.GetFileInfo(Path.Combine("wwwroot", "site.css")); 101var file = provider.GetFileInfo("some/non/existing/file.txt"); 121var file = provider.GetFileInfo("some"); 141var file = provider.GetFileInfo("wwwroot"); 164var jqueryValidate = provider.GetFileInfo(Path.Combine(folder, file)); 187var jqueryValidate = provider.GetFileInfo(Path.Combine(".", "wwwroot", "jquery.validate.js")); 210var jqueryValidate = provider.GetFileInfo(Path.Combine("..", "wwwroot", "jquery.validate.js")); 235var file = provider.GetFileInfo(path); 436var jqueryValidate = scopedProvider.GetFileInfo("jquery.validate.js"); 464var jqueryValidate = scopedProvider.GetFileInfo(path); 470private IFileInfo CreateTestFileInfo(string name, bool isDirectory = false) =>
Microsoft.Extensions.FileProviders.Physical (7)
Internal\PhysicalDirectoryContents.cs (1)
43public IEnumerator<IFileInfo> GetEnumerator() => _info.GetEnumerator();
PhysicalDirectoryInfo.cs (4)
19private IEnumerable<IFileInfo>? _entries; 72public IEnumerator<IFileInfo> GetEnumerator() 92.Select<FileSystemInfo, IFileInfo>(info => info switch 102_entries = Enumerable.Empty<IFileInfo>();
PhysicalFileProvider.cs (2)
262/// <returns>The file information. Caller must check the <see cref="IFileInfo.Exists"/> property.</returns> 263public IFileInfo GetFileInfo(string subpath)
RazorBuildWebSite (3)
UpdateableFileProvider.cs (3)
55public IFileInfo GetFileInfo(string subpath) 110public IEnumerator<IFileInfo> GetEnumerator() 117var files = new List<IFileInfo> { file };
StaticFilesAuth (1)
Startup.cs (1)
143var fileInfo = files.GetFileInfo(path);
WsFedSample (1)
Program.cs (1)
47var certificateFileInfo = embeddedFileProvider.GetFileInfo("compiler/resources/cert.pfx");