def decode_windowsnt(line, match):
    """
    Decodes a Windows NT FTP LIST line like these two:

    `11-02-18  02:12PM       <DIR>          images`
    `11-02-18  03:33PM                 9276 logo.gif`
    """
    is_dir = match.group("size") == "<DIR>"

    raw_info = {
        "basic": {
            "name": match.group("name"),
            "is_dir": is_dir,
        },
        "details": {
            "type": int(ResourceType.directory if is_dir else ResourceType.file),
        },
        "ftp": {"ls": line},
    }

    if not is_dir:
        raw_info["details"]["size"] = int(match.group("size"))

    modified = _parse_time(match.group("modified"), formats=["%d-%m-%y %I:%M%p"])
    if modified is not None:
        raw_info["details"]["modified"] = modified

    return raw_info
def decode_windowsnt ( line , match ) : is_dir = match . group ( "size" ) == "<DIR>" raw_info = { "basic" : { "name" : match . group ( "name" ) , "is_dir" : is_dir , } , "details" : { "type" : int ( ResourceType . directory if is_dir else ResourceType . file ) , } , "ftp" : { "ls" : line } , } if not is_dir : raw_info [ "details" ] [ "size" ] = int ( match . group ( "size" ) ) modified = _parse_time ( match . group ( "modified" ) , formats = [ "%d-%m-%y %I:%M%p" ] ) if modified is not None : raw_info [ "details" ] [ "modified" ] = modified return raw_info
Decodes a Windows NT FTP LIST line like these two:

    `11-02-18  02:12PM       <DIR>          images`
    `11-02-18  03:33PM                 9276 logo.gif`