Class ApplicationPaths
This class contains supporting properties and methods for managing configuration paths and files within a UAC secured Windows environment.
Inheritance
Inherited Members
Namespace: Talegen.Storage.Net.Core.Disk
Assembly: Talegen.Storage.Net.Core.dll
Syntax
public static class ApplicationPaths
Properties
| Improve this Doc View SourceApplicationPath
Gets the full path to the application base directory.
Declaration
public static string ApplicationPath { get; }
Property Value
Type | Description |
---|---|
System.String |
CurrentExecutablePath
Gets the full path to the currently running executable.
Declaration
public static string CurrentExecutablePath { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
| Improve this Doc View SourceConfigurationFilePath(String, Boolean, String)
Gets the file path to the application configuration file.
Declaration
public static string ConfigurationFilePath(string configurationFileName, bool forAllUsers = true, string applicationTitle = "")
Parameters
Type | Name | Description |
---|---|---|
System.String | configurationFileName | Contains the configuration file name. |
System.Boolean | forAllUsers |
|
System.String | applicationTitle | Contains the name of the application to append to the path. |
Returns
Type | Description |
---|---|
System.String | Returns the full path to a configuration file. |
ConfigurationFolderExists(Boolean, String)
Gets a value indicating whether the configuration folder exists.
Declaration
public static bool ConfigurationFolderExists(bool forAllUsers = true, string applicationTitle = "")
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | forAllUsers |
|
System.String | applicationTitle | Contains the name of the application to append to the path. |
Returns
Type | Description |
---|---|
System.Boolean | Returns a value indicating whether the configuration folder exists. |
ConfigurationFolderPath(Boolean, String)
This method is used to get the folder path where configuration files are stored.
Declaration
public static string ConfigurationFolderPath(bool forAllUsers = true, string applicationTitle = "")
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | forAllUsers |
|
System.String | applicationTitle | Contains the name of the application to append to the path. |
Returns
Type | Description |
---|---|
System.String | Returns to a common application path where configurations can be stored. |
CreateConfigurationPath(Boolean, String)
This method is used to create the configuration path if it doesn't exist already.
Declaration
public static bool CreateConfigurationPath(bool forAllUsers = true, string applicationTitle = "")
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | forAllUsers |
|
System.String | applicationTitle | Contains the name of the application to append to the path. |
Returns
Type | Description |
---|---|
System.Boolean | Returns a value indicating whether the configuration path was created successfully. |