C# Class SIL.CoreImpl.DirectoryFinder

This class is used to find files and directories for an SIL app.
Mostrar archivo Open project: sillsdev/FieldWorks Class Usage Examples

Private Properties

Property Type Description
ResetStaticVars void

Public Methods

Method Description
CommonAppDataFolder ( string appName ) : string

Gets the path for storing common application data that might be shared between multiple applications and multiple users on the same machine. On Windows this returns a subdirectory of Environment.SpecialFolder.CommonApplicationData (C:\ProgramData),on Linux /var/lib/fieldworks.

GetFolderPath ( Environment folder ) : string

Gets a special folder, very similar to Environment.GetFolderPath. The main difference is that this method works cross-platform and does some translations. For example CommonApplicationData (/usr/share) is not writeable on Linux, so we translate that to /var/lib/fieldworks instead.

UserAppDataFolder ( string appName ) : string

Gets the path for storing user-specific application data.

Private Methods

Method Description
ResetStaticVars ( ) : void

Resets the static variables. Used for unit tests.

Method Details

CommonAppDataFolder() public static method

Gets the path for storing common application data that might be shared between multiple applications and multiple users on the same machine. On Windows this returns a subdirectory of Environment.SpecialFolder.CommonApplicationData (C:\ProgramData),on Linux /var/lib/fieldworks.
public static CommonAppDataFolder ( string appName ) : string
appName string Name of the application.
return string

GetFolderPath() public static method

Gets a special folder, very similar to Environment.GetFolderPath. The main difference is that this method works cross-platform and does some translations. For example CommonApplicationData (/usr/share) is not writeable on Linux, so we translate that to /var/lib/fieldworks instead.
public static GetFolderPath ( Environment folder ) : string
folder System.Environment
return string

UserAppDataFolder() public static method

Gets the path for storing user-specific application data.
public static UserAppDataFolder ( string appName ) : string
appName string Name of the application.
return string