Class FileSystems
Provides the system filesystems.
Inheritance
object
Namespace: Umbraco.Cms.Core.IO
Assembly: Umbraco.Core.dll
Syntax
public sealed class FileSystems
Constructors
View SourceFileSystems(ILoggerFactory, IIOHelper, IOptions<GlobalSettings>, IHostingEnvironment)
Declaration
public FileSystems(ILoggerFactory loggerFactory, IIOHelper ioHelper, IOptions<GlobalSettings> globalSettings, IHostingEnvironment hostingEnvironment)
Parameters
| Type | Name | Description |
|---|---|---|
| ILoggerFactory | loggerFactory | |
| IIOHelper | ioHelper | |
| IOptions<GlobalSettings> | globalSettings | |
| IHostingEnvironment | hostingEnvironment |
Properties
View SourceIsScoped
Used be Scope provider to take control over the filesystems, should never be used for anything else.
Declaration
public Func<bool?>? IsScoped { get; set; }
Property Value
| Type | Description |
|---|---|
| Func<bool?> |
MvcViewsFileSystem
Gets the MVC views filesystem.
Declaration
public IFileSystem? MvcViewsFileSystem { get; }
Property Value
| Type | Description |
|---|---|
| IFileSystem |
PartialViewsFileSystem
Gets the partial views filesystem.
Declaration
public IFileSystem? PartialViewsFileSystem { get; }
Property Value
| Type | Description |
|---|---|
| IFileSystem |
ScriptsFileSystem
Gets the scripts filesystem.
Declaration
public IFileSystem? ScriptsFileSystem { get; }
Property Value
| Type | Description |
|---|---|
| IFileSystem |
StylesheetsFileSystem
Gets the stylesheets filesystem.
Declaration
public IFileSystem? StylesheetsFileSystem { get; }
Property Value
| Type | Description |
|---|---|
| IFileSystem |
Methods
View SourceCreateShadowWrapper(IFileSystem, string)
Creates a shadow wrapper for a filesystem, should never be used outside UmbracoBuilder or testing
Declaration
public IFileSystem CreateShadowWrapper(IFileSystem filesystem, string shadowPath)
Parameters
| Type | Name | Description |
|---|---|---|
| IFileSystem | filesystem | |
| string | shadowPath |
Returns
| Type | Description |
|---|---|
| IFileSystem |
SetStylesheetFilesystem(IFileSystem)
Sets the stylesheet filesystem.
Declaration
public void SetStylesheetFilesystem(IFileSystem fileSystem)
Parameters
| Type | Name | Description |
|---|---|---|
| IFileSystem | fileSystem | The IFileSystem. |
Remarks
Be careful when using this, the root path and root url must be correct for this to work.
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | If the |
| InvalidOperationException | Throws exception if the StylesheetFileSystem has already been initialized. |
| InvalidOperationException | Throws exception if full path can't be resolved successfully. |
Shadow()
Shadows the filesystem, should never be used outside the Scope class.
Declaration
public ICompletable Shadow()
Returns
| Type | Description |
|---|---|
| ICompletable |