This logic equals to `FileUtil#isAncestor(parent, child, false)`