Share via


PathUtil.IsDescendant(String, String) Method

Definition

Indicates whether the a child path is a descendant of a parent directory. This is a purely textual computation indicating that the child could be a descendant of the parent; there is no file system interaction to determine whether child actually is a descendant of parent.

public:
 static bool IsDescendant(System::String ^ parent, System::String ^ child);
public:
 static bool IsDescendant(Platform::String ^ parent, Platform::String ^ child);
 static bool IsDescendant(std::wstring const & parent, std::wstring const & child);
public static bool IsDescendant (string parent, string child);
static member IsDescendant : string * string -> bool
Public Function IsDescendant (parent As String, child As String) As Boolean

Parameters

parent
String

Parent directory

child
String

Prospective child file/directory

Returns

True if descendant, false if not

Applies to