<PackageReference Include="Microsoft.Extensions.FileProviders.Abstractions" Version="11.0.0-preview.7.26381.103" />

Microsoft.Extensions.FileProviders.IFileInfo

public interface IFileInfo
Represents a file in the given file provider.
bool Exists { get; }

Gets a value that indicates if the resource exists in the underlying storage system.

bool IsDirectory { get; }

Gets a value that indicates whether TryGetDirectoryContents has enumerated a subdirectory.

Gets the time when the file was last modified.

long Length { get; }

Gets the length of the file in bytes, or -1 for a directory or nonexistent file.

string Name { get; }

Gets the name of the file or directory, not including any path.

string PhysicalPath { get; }

Gets the path to the file, including the file name. Returns null if the file is not directly accessible.

Returns file contents as a read-only stream.