Delen via


PhysicalFileProvider.GetDirectoryContents(String) Method

Definition

Enumerate a directory at the given path, if any.

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

Parameters

subpath
String

A path under the root directory. Leading slashes are ignored.

Returns

Contents of the directory. Caller must check Exists property. NotFoundDirectoryContents if subpath is absolute, if the directory does not exist, or subpath has invalid characters.

Implements

Applies to