IFileInfo Interface¶
Represents a file in the given file provider.
- Namespace
Microsoft.Extensions.FileProviders
- Assemblies
- Microsoft.Extensions.FileProviders.Abstractions
Methods¶
-
CreateReadStream
()¶ Return file contents as readonly stream. Caller should dispose stream when complete.
Return type: System.IO.Stream Returns: The file stream Stream CreateReadStream()
-
Properties¶
-
Microsoft.Extensions.FileProviders.IFileInfo.
Exists
¶ True if resource exists in the underlying storage system.
Return type: System.Boolean bool Exists { get; }
-
Microsoft.Extensions.FileProviders.IFileInfo.
IsDirectory
¶ True for the case TryGetDirectoryContents has enumerated a sub-directory
Return type: System.Boolean bool IsDirectory { get; }
-
Microsoft.Extensions.FileProviders.IFileInfo.
LastModified
¶ When the file was last modified
Return type: System.DateTimeOffset DateTimeOffset LastModified { get; }
-
Microsoft.Extensions.FileProviders.IFileInfo.
Length
¶ The length of the file in bytes, or -1 for a directory or non-existing files.
Return type: System.Int64 long Length { get; }
-
Microsoft.Extensions.FileProviders.IFileInfo.
Name
¶ The name of the file or directory, not including any path.
Return type: System.String string Name { get; }
-
Microsoft.Extensions.FileProviders.IFileInfo.
PhysicalPath
¶ The path to the file, including the file name. Return null if the file is not directly accessible.
Return type: System.String string PhysicalPath { get; }
-