Hermod
A cross-platform, modular and fully GDPR-compliant email archival solution!
Loading...
Searching...
No Matches
Hermod.Core.AppInfo Class Reference

Static class containing basic information for and about the application. More...

Static Public Member Functions

static DirectoryInfo GetBaseHermodDirectory ()
 Gets the application's base data directory.
 
static DirectoryInfo GetLocalHermodDirectory ()
 Gets the application's local data directory.
 

Properties

static string HermodAppDirName [get]
 Gets the name of this application's main data directory.
 
static string HermodAppCfgDirName [get]
 Gets the name of the application's config directory.
 
static string HermodAppPluginDirName [get]
 Gets the name of the application's plugins directory.
 
static string HermodLogDirName [get]
 Gets the name of the application's log directory. Typically this is stored.
 

Detailed Description

Static class containing basic information for and about the application.

Definition at line 10 of file AppInfo.cs.

Member Function Documentation

◆ GetBaseHermodDirectory()

static DirectoryInfo Hermod.Core.AppInfo.GetBaseHermodDirectory ( )
inlinestatic

Gets the application's base data directory.

Returns
The base directory for the application's data.

Definition at line 37 of file AppInfo.cs.

37 {
38 string? basePath = null;
39 switch (Environment.OSVersion.Platform) {
40 case PlatformID.Win32NT:
41 basePath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
42 break;
43 default:
44 basePath = "/etc";
45 break;
46 // leave room to diversify later
47 }
48
49 return new DirectoryInfo(Path.Combine(basePath, HermodAppDirName));
50 }
static string HermodAppDirName
Gets the name of this application's main data directory.
Definition: AppInfo.cs:15

References Hermod.Core.AppInfo.HermodAppDirName.

Referenced by Hermod.Config.ConfigManager.GetDefaultConfigPath().

◆ GetLocalHermodDirectory()

static DirectoryInfo Hermod.Core.AppInfo.GetLocalHermodDirectory ( )
inlinestatic

Gets the application's local data directory.

Data stored here will remain local to the computer and will not roam with the user.

Returns
A <see cref="DirectoryInfo"/ object pointing to the directory.>

Definition at line 59 of file AppInfo.cs.

59 {
60 string? basePath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
61
62 return new DirectoryInfo(Path.Combine(basePath, HermodAppDirName));
63 }

References Hermod.Core.AppInfo.HermodAppDirName.

Referenced by Hermod.EmailImport.EmailImporter.OnLoad().

Property Documentation

◆ HermodAppCfgDirName

string Hermod.Core.AppInfo.HermodAppCfgDirName
staticget

Gets the name of the application's config directory.

Definition at line 20 of file AppInfo.cs.

Referenced by Hermod.Config.ConfigManager.GetDefaultConfigPath().

◆ HermodAppDirName

string Hermod.Core.AppInfo.HermodAppDirName
staticget

Gets the name of this application's main data directory.

Definition at line 15 of file AppInfo.cs.

Referenced by Hermod.Core.AppInfo.GetBaseHermodDirectory(), and Hermod.Core.AppInfo.GetLocalHermodDirectory().

◆ HermodAppPluginDirName

string Hermod.Core.AppInfo.HermodAppPluginDirName
staticget

Gets the name of the application's plugins directory.

Definition at line 25 of file AppInfo.cs.

◆ HermodLogDirName

string Hermod.Core.AppInfo.HermodLogDirName
staticget

Gets the name of the application's log directory. Typically this is stored.

Definition at line 31 of file AppInfo.cs.


The documentation for this class was generated from the following file: