IFileProvider Interface¶
A read-only file provider abstraction.
- Namespace
Microsoft.Extensions.FileProviders
- Assemblies
- Microsoft.Extensions.FileProviders.Abstractions
Methods¶
-
GetDirectoryContents
(System.String)¶ Enumerate a directory at the given path, if any.
Arguments: subpath (System.String) – Relative path that identifies the directory. Return type: Microsoft.Extensions.FileProviders.IDirectoryContents Returns: Returns the contents of the directory. IDirectoryContents GetDirectoryContents(string subpath)
-
GetFileInfo
(System.String)¶ Locate a file at the given path.
Arguments: subpath (System.String) – Relative path that identifies the file. Return type: Microsoft.Extensions.FileProviders.IFileInfo Returns: The file information. Caller must check Exists property. IFileInfo GetFileInfo(string subpath)
-
Watch
(System.String)¶ Creates a
Microsoft.Extensions.Primitives.IChangeToken
for the specified <em>filter</em>.Arguments: filter (System.String) – Filter string used to determine what files or folders to monitor. Example: /*.cs, *.*, subFolder//*.cshtml. Return type: Microsoft.Extensions.Primitives.IChangeToken Returns: An Microsoft.Extensions.Primitives.IChangeToken
that is notified when a file matching <em>filter</em> is added, modified or deleted.IChangeToken Watch(string filter)
-