PathUtil.IsDescendant(String, String) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
指示子路径是否为父目录的后代。 这是纯文本计算,指示子对象 可以是 父级的后代;没有任何文件系统交互来确定子级是否确实 是 父级的后代。
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
参数
- parent
- String
父目录
- child
- String
预期的子文件/目录
返回
如果为 True,则为 True; 否则为 false