NullFileProvider Class

An empty file provider with no contents.

Namespace
Microsoft.Extensions.FileProviders
Assemblies
  • Microsoft.Extensions.FileProviders.Abstractions

Syntax

public class NullFileProvider : IFileProvider
class Microsoft.Extensions.FileProviders.NullFileProvider

Methods

GetDirectoryContents(System.String)

Enumerate a non-existent directory.

Arguments:subpath (System.String) – A path under the root directory. This parameter is ignored.
Return type:Microsoft.Extensions.FileProviders.IDirectoryContents
Returns:A Microsoft.Extensions.FileProviders.IDirectoryContents that does not exist and does not contain any contents.
public IDirectoryContents GetDirectoryContents(string subpath)
GetFileInfo(System.String)

Locate a non-existent file.

Arguments:subpath (System.String) – A path under the root directory.
Return type:Microsoft.Extensions.FileProviders.IFileInfo
Returns:A Microsoft.Extensions.FileProviders.IFileInfo representing a non-existent file at the given path.
public IFileInfo GetFileInfo(string subpath)
Watch(System.String)

Returns a Microsoft.Extensions.Primitives.IChangeToken that monitors nothing.

Arguments:filter (System.String) – Filter string used to determine what files or folders to monitor. This parameter is ignored.
Return type:Microsoft.Extensions.Primitives.IChangeToken
Returns:A Microsoft.Extensions.Primitives.IChangeToken that does not register callbacks.
public IChangeToken Watch(string filter)