Class PathHelper
- Namespace
- NominalSystems.Core
- Assembly
- NominalSystems.Core.dll
Static helper function for getting files and paths in a directory
public static class PathHelper
- Inheritance
-
PathHelper
Properties
SolutionDirectory
Returns the full path to the solution directory
public static string SolutionDirectory { get; }
Property Value
Methods
FileExists(string)
Returns true if the the file exists else false.
public static bool FileExists(string path)
Parameters
path
stringFile to check
Returns
ForceInitialise()
Forces the path helper to be initialised with some default paths without using the standard C# ones.
public static void ForceInitialise()
GetFilePath(string)
Returns the full system path for a particular file. Throws exception if it can't be found.
public static string GetFilePath(string path)
Parameters
path
stringThe local file name and suffix
Returns
- string
The full path to the file
GetFolderPath(string)
Returns the full system path for a folder. Returns an empty string if it cannot be found.
public static string GetFolderPath(string path)
Parameters
path
stringFolder to search or path to folder.
Returns
- string
The full path to the folder
SetDefaults()
Sets up the default paths in the search path list
public static void SetDefaults()