def is_subdir(child, parent):
    """
    Check whether "parent" is a sub-directory of "child".

    :param child: Child path.
    :type child: ``str``
    :param parent: Parent directory to check against.
    :type parent: ``str``
    :return: True if child is a sub-directory of the parent.
    :rtype: ``bool``
    """
    return child.startswith(parent)