IFileInfo IFileInfo IFileInfo Interface


Represents a file in the given file provider.

public interface IFileInfo
type IFileInfo = interface
Public Interface IFileInfo


Exists Exists Exists

True if resource exists in the underlying storage system.

IsDirectory IsDirectory IsDirectory

True for the case TryGetDirectoryContents has enumerated a sub-directory

LastModified LastModified LastModified

When the file was last modified

Length Length Length

The length of the file in bytes, or -1 for a directory or non-existing files.

Name Name Name

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

PhysicalPath PhysicalPath PhysicalPath

The path to the file, including the file name. Return null if the file is not directly accessible.


CreateReadStream() CreateReadStream() CreateReadStream()

Return file contents as readonly stream. Caller should dispose stream when complete.

Applies to