CompositeFileProvider.GetFileInfo(String) 方法

定义

在给定的路径查找文件。Locates a file at the given path.

public:
 virtual Microsoft::Extensions::FileProviders::IFileInfo ^ GetFileInfo(System::String ^ subpath);
public Microsoft.Extensions.FileProviders.IFileInfo GetFileInfo (string subpath);
abstract member GetFileInfo : string -> Microsoft.Extensions.FileProviders.IFileInfo
override this.GetFileInfo : string -> Microsoft.Extensions.FileProviders.IFileInfo
Public Function GetFileInfo (subpath As String) As IFileInfo

参数

subpath
String

用于标识文件的路径。The path that identifies the file.

返回

IFileInfo

文件信息。The file information. 调用方必须检查 Exists 属性。Caller must check Exists property. 这将是由提供的 IFileProvider 返回的第一个现有的 IFileInfo;或者,如果找不到任何现有文件,则返回“未找到 IFileInfo”。This will be the first existing IFileInfo returned by the provided IFileProvider or a not found IFileInfo if no existing files is found.

实现

适用于