using System;
namespace Wayne.Lib.IO
{
///
/// Interface.
///
public interface IPaths
{
#region Properties
///
/// The root path used by Wayne applications.
///
string Root { get; }
///
/// The base path to all config files.
///
string Config { get; }
///
/// The base path to all transaction files.
///
string Transactions { get; }
///
/// The base path to all log files.
///
string Log { get; }
///
/// The complete path (including the file name) to the executable.
///
string ExecutablePath { get; }
///
/// The directory path to the executable.
///
string ExecutableDirectory { get; }
///
/// The base path to data files.
///
string Data { get; }
#endregion
#region Methods
///
/// Combines the Root path and the given subPath.
///
/// The sub path (under the main path).
///
string Combine(string subPath);
///
/// Combines the Root path and the given subPath and file name.
///
/// The sub path (under the main path).
/// An additional sub path (or the name of a file).
///
string Combine(string subPath, string subPath2);
///
/// Returns the config path to the given config name.
///
/// The name of the config.
///
string GetConfigPath(string configName);
///
/// Returns the config path to the given config name.
///
/// The name of the config.
/// The name of a config file.
///
string GetConfigPath(string configName, string fileName);
///
/// Returns the transaction file path to the given terminal type.
///
/// The name of the terminal type.
///
string GetTransactionsPath(string terminalType);
///
/// Returns the transaction file path to the given terminal type.
///
/// The name of the terminal type.
/// The name of the sub state.
///
string GetTransactionsPath(string terminalType, string subState);
///
/// Replaces the extension of a file (e.g. from C:\MyFile.aaa to C:\MyFile.bbb)
///
///
///
///
string ReplaceExtension(string fileName, string newExtension);
#endregion
#region Parse
///
/// Parses the path to replace any %...% variables with the current actual path.
///
///
///
string Parse(string path);
///
/// Checks if file exists
///
///
///
[Obsolete("Use the DirectoryExists() in FileSupport instead!")]
bool FileExists(string fileName);
///
/// Checks if directory exists
///
///
///
[Obsolete("Use the DirectoryExists() in FileSupport instead!")]
bool DirectoryExists(string path);
///
/// Ensures the directory exists by trying to create it if it does not exist already.
///
///
///
[Obsolete("Use the DirectoryExists() in FileSupport instead!")]
bool EnsureDirectoryExists(string path);
#endregion
}
}