FileServerOptions Class¶
Options for all of the static file middleware components
- Namespace
Microsoft.AspNetCore.Builder
- Assemblies
- Microsoft.AspNetCore.StaticFiles
Syntax¶
public class FileServerOptions : SharedOptionsBase
-
class
Microsoft.AspNetCore.Builder.
FileServerOptions
Constructors¶
-
FileServerOptions
()¶ Creates a combined options class for all of the static file middleware components.
public FileServerOptions()
-
Properties¶
-
Microsoft.AspNetCore.Builder.FileServerOptions.
DefaultFilesOptions
¶ Options for configuring the DefaultFilesMiddleware.
Return type: Microsoft.AspNetCore.Builder.DefaultFilesOptions public DefaultFilesOptions DefaultFilesOptions { get; }
-
Microsoft.AspNetCore.Builder.FileServerOptions.
DirectoryBrowserOptions
¶ Options for configuring the DirectoryBrowserMiddleware.
Return type: Microsoft.AspNetCore.Builder.DirectoryBrowserOptions public DirectoryBrowserOptions DirectoryBrowserOptions { get; }
-
Microsoft.AspNetCore.Builder.FileServerOptions.
EnableDefaultFiles
¶ Default files are enabled by default.
Return type: System.Boolean public bool EnableDefaultFiles { get; set; }
-
Microsoft.AspNetCore.Builder.FileServerOptions.
EnableDirectoryBrowsing
¶ Directory browsing is disabled by default.
Return type: System.Boolean public bool EnableDirectoryBrowsing { get; set; }
-
Microsoft.AspNetCore.Builder.FileServerOptions.
StaticFileOptions
¶ Options for configuring the StaticFileMiddleware.
Return type: Microsoft.AspNetCore.Builder.StaticFileOptions public StaticFileOptions StaticFileOptions { get; }
-