Nucleus .Net Core CMS

Models.Configuration.FolderOptions Class

Namespace: Nucleus.Abstractions.Models.Configuration
Assembly: Nucleus.Abstractions.dll
Represents application folders.

Properties

DataFolder Property

Gets the default application data storage folder location, used for logs and database files.

Fields

Section Field

Configuration file section.

TEMP_FOLDER Field

Sub folder name (within the Nucleus data folder) used for temp files

EXTENSIONS_AUTO_INSTALL_FOLDER Field

Sub folder name (within the Nucleus temp folder) used for extensions that should be automatically installed

LOG_FOLDER Field

Sub folder name (within the Nucleus data folder) used for log files

CACHE_FOLDER Field

Sub folder name (within the Nucleus data folder) used for cache files

SHARED_FOLDER Field

Sub folder name (in the web root folder) used for shared files

CONTAINERS_FOLDER Field

Sub folder name (in the web root folder) used for shared containers

LAYOUTS_FOLDER Field

Sub folder name (in the web root folder) used for shared layouts

AREAS_FOLDER Field

Sub folder name (in the web root folder) used for areas

EXTENSIONS_FOLDER Field

Sub folder name (in the web root folder) used for extensions

RESOURCES_FOLDER Field

Sub folder name (in the web root folder) used for shared resources (css, js and third-party libraries)

ALLOWED_STATICFILE_PATHS Field

Array of allowed static file paths

Methods

GetWebRootFolder

GetWebRootFolder ()
Gets the application root folder.

ParseFolder (String) Method

ParseFolder (String folderName)
Replaces tokens from configuration entries representing a file name, and returns an absolute path.
Parameters
Name Type
folderName String

Parse (String) Method

Parse (String value)
Replaces tokens from any configuration file value.
Parameters
Name Type
value String

GetExtensionsFolder

GetExtensionsFolder ()
Gets the full path to the extensions folder.

GetExtensionsFolder (Boolean) Method

GetExtensionsFolder (Boolean create)
Gets the full path to the extensions folder.
Parameters
Name Type
create Boolean

Specifies whether to create the folder if it does not already exist.

GetExtensionsFolderStatic (Boolean) Method

GetExtensionsFolderStatic (System.Boolean)
Gets the full path to the extensions folder.

GetExtensionFolderStatic (String,Boolean) Method

GetExtensionFolderStatic (String name, Boolean create)
Gets a sub-folder of the extensions folder.
Parameters
Name Type
name String

The name of your extension folder, relative to the extensions folder root.

create Boolean

Specifies whether to create the folder if it does not already exist.

GetExtensionFolder (String,Boolean) Method

GetExtensionFolder (String name, Boolean create)
Gets a sub-folder of the extensions folder.
Parameters
Name Type
name String

The name of your extension folder, relative to the extensions folder root.

create Boolean

Specifies whether to create the folder if it does not already exist.

SetDefaultDataFolder (Boolean) Method

SetDefaultDataFolder (Boolean ensureExists)
Sets the data folder to a default value if its current value is empty, after replacing environment variables.
Parameters
Name Type
ensureExists Boolean

Specifies whether to ensure that the path exists by creating the folder if it does not already exist.

SetDataFolder (String,Boolean) Method

SetDataFolder (String value, Boolean ensureExists)
Sets the data folder to the specified value, after replacing environment variables.
Parameters
Name Type
value String

Data folder path

ensureExists Boolean

Specifies whether to ensure that the path exists by creating the folder if it does not already exist.

Remarks
This function is intended for use in a workaround to facilitate startup logging, and should not be called by anything except LoggingBuilderExtensions.ConfigureTextFileLogger.

EnsureExists (String) Method

EnsureExists (String path)
Check whether the specified folder exists, and create it if it does not.
Parameters
Name Type
path String

EnsureExistsStatic (String) Method

EnsureExistsStatic (String path)
Check whether the specified folder exists, and create it if it does not.
Parameters
Name Type
path String

GetDataFolder

GetDataFolder ()
Gets the root data storage folder location.

GetTempFolder

GetTempFolder ()
Gets the data storage folder location for temporary files.
Remarks
If the folder does not exist, it is created.

GetTempFolder (Boolean) Method

GetTempFolder (Boolean create)
Gets the data storage folder location for temporary files.
Parameters
Name Type
create Boolean

Specifies whether to check that the folder exists and create it if not.

GetAutoInstallExtensionsFolder

GetAutoInstallExtensionsFolder ()
Gets the folder which contains extension packages which are to be automatically installed.

GetLogFolder

GetLogFolder ()
Gets the data storage folder location for log files.
Remarks
If the folder does not exist, it is created.

GetLogFolder (Boolean) Method

GetLogFolder (System.Boolean)
Gets the data storage folder location for log files.

GetLogFolder (String) Method

GetLogFolder (String subFolder)
Gets the data storage folder location for log files.
Parameters
Name Type
subFolder String
Remarks
If the folder does not exist, it is created.

GetLogFolder (String,Boolean) Method

GetLogFolder (System.String,  System.Boolean)
Gets the data storage folder location for log files.

GetCacheFolder

GetCacheFolder ()
Gets the data storage folder location for cache files.
Remarks
If the folder does not exist, it is created.

GetCacheFolder (Boolean) Method

GetCacheFolder (Boolean create)
Gets the data storage folder location for cache files.
Parameters
Name Type
create Boolean

Specifies whether to check that the folder exists and create it if not.

GetCacheFolder (String) Method

GetCacheFolder (System.String)
Gets the data storage folder location for cache files and appends the specified sub-folder.
Remarks
If the folder does not exist, it is created.

GetCacheFolder (String,Boolean) Method

GetCacheFolder (String subFolder, Boolean create)
Gets the data storage folder location for cache files and appends the specified sub-folder.
Parameters
Name Type
subFolder String

Specifies a sub-folder of the cache folder.

create Boolean

Specifies whether to check that the folder exists and create it if not.

GetDataFolder (String,Boolean) Method

GetDataFolder (String subFolder, Boolean create)
Gets an application data storage folder sub-folder.
Parameters
Name Type
subFolder String
create Boolean

Specifies whether to check that the folder exists and create it if not.

Remarks
If the folder does not exist, it is created.

NormalizePath (String) Method

NormalizePath (String path)
Return the specified path with path separator "\" characters replaced by "/" so that the path will work in both Windows and Linux.
Parameters
Name Type
path String