Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

interface Microsoft.​Extensions.​FileProviders.​IFileInfo

Assembly: Microsoft.Extensions.FileProviders.Abstractions

Represents a file in the given file provider.

Properties

bool
Exists
Gets a value that indicates if the resource exists in the underlying storage system.
bool
IsDirectory
Gets a value that indicates whether <c>TryGetDirectoryContents</c> has enumerated a subdirectory.
Gets the time when the file was last modified.
long
Length
Gets the length of the file in bytes, or -1 for a directory or nonexistent file.
string
Name
Gets the name of the file or directory, not including any path.
string
PhysicalPath
Gets the path to the file, including the file name. Returns <see langword="null" /> if the file is not directly accessible.

Methods

CreateReadStream​()
Returns file contents as a read-only stream.
Returns The file stream.
Remarks The caller should dispose the stream when complete.