EmbeddedFileProvider.GetDirectoryContents(String) 方法
定义
枚举位于给定路径的目录(如果有)。Enumerate a directory at the given path, if any. 此文件提供程序使用平面目录结构。This file provider uses a flat directory structure. 基命名空间下的所有内容都被视为一个目录。Everything under the base namespace is considered to be one directory.
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
用于标识目录的路径The path that identifies the directory
返回
目录的内容。Contents of the directory. 调用方必须检查 Exists 属性。Caller must check Exists property. 如果找不到匹配 subpath 的资源,则为 NotFoundDirectoryContentsA NotFoundDirectoryContents if no resources were found that match subpath