import re


def isfilepath(value):
    """
    Return whether or not given value is Win or Unix file path and returns it's type.
    If the value is Win or Unix file path, this function returns ``True, Type``, otherwise ``False, Type``.

    Examples::

        >>> isfilepath('c:\\path\\file (x86)\\bar')
        True, 'Win'

        >>> isfilepath('/path')
        True, 'Unix'

        >>> isfilepath('c:/path/file/')
        False, 'Unknown'

    :param value: string to validate file path
    """
    win_path = re.compile(r'^[a-zA-Z]:\\(?:[^\\/:*?"<>|\r\n]+\\)*[^\\/:*?"<>|\r\n]*$')
    nix_path = re.compile(r'^(/[^/\x00]*)+/?$')
    if win_path.match(value):
        # check windows path limit see:
        # http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath
        if len(value[3:]) > 32767:
            return False, 'Win'
        return True, 'Win'
    elif nix_path.match(value):
        return True, 'Unix'
    return False, 'Unknown'