def isVisible(name, showHidden):
    """
    Function to check, if a filesystem entry is a hidden file or directory.
    
    @param name name to be checked
    @type str
    @param showHidden flag indicating to show hidden files as well
    @type bool
    @return flag indicating a visible filesystem entry
    @rtype bool
    """
    return showHidden or not name.startswith('.') and not name.endswith('~')
