Class SystemInformation
- Namespace
- Dynamicweb.Core
- Assembly
- Dynamicweb.Core.dll
The SystemInformation class provides information about the system.
public class SystemInformation
- Inheritance
-
SystemInformation
- Inherited Members
Properties
RootDirectory
Gets or sets the root directory.
public static DirectoryInfo? RootDirectory { get; set; }
Property Value
- DirectoryInfo
The root directory.
Methods
AddOrUpdateVirtualDirectoryMapping(string, DirectoryInfo)
Adds or updates a mapping of a virtual directory to a physical path.
public static void AddOrUpdateVirtualDirectoryMapping(string directoryName, DirectoryInfo info)
Parameters
directoryName
stringName of the directory.
info
DirectoryInfoThe absolute path to the mapped directory.
AddVirtualDirectoryMapping(string, DirectoryInfo)
Adds a mapping of a virtual directory to a physical path.
public static void AddVirtualDirectoryMapping(string directoryName, DirectoryInfo info)
Parameters
directoryName
stringName of the directory.
info
DirectoryInfoThe absolute path to the mapped directory.
MapPath(string)
The MapPath method maps the specified relative or virtual path to the corresponding physical directory on the server.
public static string MapPath(string relativePath)
Parameters
relativePath
stringThe relative path.
Returns
- string
absolutePath
Remarks
Does not support '..' in paths
SanitizePath(string)
Sanitizes the path, ensuring that it is in the format expected for a file-system path.
public static string SanitizePath(string path)
Parameters
path
stringThe path.
Returns
- string
sanitizedPath