PathHelper.EnsureValidRelativePath Method
- Namespace
- Kampute.DocToolkit.Support
- Assembly
- Kampute.DocToolkit.dll
Definition
Validates the specified path to ensure it is a relative path and does not contain invalid characters.
public static string EnsureValidRelativePath(string path, string caller = "")Parameters
Returns
- string
- The validated path where backslashes are replaced with forward slashes and trailing slashes are removed.
Exceptions
- ArgumentException
- Thrown when the path is not relative.
- Thrown when the path contains invalid characters.
