System::IO::Path::CheckPath method

Path::CheckPath method

Determines if the specified path is valid by checking if it contains invalid characters. An exception is thrown if the path contains invalid characters.

static void System::IO::Path::CheckPath(const String &path, const String &msg=s_msg_path, bool allow_empty=true)
ParameterTypeDescription
pathconst String&The path to check
msgconst String&The message to pass to the exception object’s constructor
allow_emptyboolSpecifies whether an empty or null string should be considered a correct path (true) or not (false); if this parameter is false and path is empty an ArgumentException is thrown; if this parameter is false and path is null an ArgumentNullException is thrown

See Also