NDepend.API Documentation
IsValidDirectoryPath(String,String) Method
NDepend.Path Namespace > PathHelpers Class > IsValidDirectoryPath Method : IsValidDirectoryPath(String,String) Method
This string from which is determined the path validity.
If false is returned, failureReason contains the plain english description of the failure.
Determine whether this string is a valid directory path or not.
Syntax
[Extension()]
public static bool IsValidDirectoryPath( 
   string pathString,
   out string failureReason
)

Parameters

pathString
This string from which is determined the path validity.
failureReason
If false is returned, failureReason contains the plain english description of the failure.

Return Value

true if this string represents a valid relative or absolute directory path, otherwise false.
Remarks
If this method returns true, the extension method ToDirectoryPath can be safely invoked on this string to obtain a IDirectoryPath. Notice that this method can return true even if the path represented by this string doesn't exist.
Requirements

Target Platforms: Windows 11, 10, 8, 7 and Linux, MacOS with net8.0, net7.0 or net6.0 installed

See Also

Reference

PathHelpers Class
PathHelpers Members
Overload List