EmbeddedFileProvider.GetDirectoryContents(String) 方法

定义

枚举位于给定路径的目录(如果有)。 此文件提供程序使用平面目录结构。 基命名空间下的所有内容都被视为一个目录。

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

参数

subpath
String

用于标识目录的路径

返回

目录的内容。 调用方必须检查 Exists 属性。 如果找不到匹配 subpath 的资源,则为 NotFoundDirectoryContents

实现

适用于