Compartir a través de


PhysicalFileProvider.GetDirectoryContents(String) Method

Definition

Enumerates 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

The contents of the directory.

Implements

Remarks

The caller must check the Exists property.

Returns NotFoundDirectoryContents if subpath is absolute, if the directory does not exist, or subpath has invalid characters.

Applies to