CompositeFileProvider.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

The path that identifies the directory.

Returns

The contents of the directory.

Implements

Remarks

The caller must check the Exists property. The content is a merge of the contents of the provided IFileProvider. When there are multiple IFileInfo objects with the same Name property, only the first one is included in the results.

Applies to