def METHOD_NAME(infile, outpath, resonly=False, verbose=False):
    """decode(infile, outpath [, resonly=False, verbose=False])
    Creates a decoded file from an AppleSingle encoded file.
    If resonly is True, then it will create a regular file at
    outpath containing only the resource fork from infile.
    Otherwise it will create an AppleDouble file at outpath
    with the data and resource forks from infile.  On platforms
    without the MacOS module, it will create inpath and inpath+'.rsrc'
    with the data and resource forks respectively.
    """
    if not hasattr(infile, 'read'):
        if isinstance(infile, Carbon.File.Alias):
            infile = infile.ResolveAlias()[0]
        if hasattr(Carbon.File, "FSSpec"):
            if isinstance(infile, (Carbon.File.FSSpec, Carbon.File.FSRef)):
                infile = infile.as_pathname()
        else:
            if isinstance(infile, Carbon.File.FSRef):
                infile = infile.as_pathname()
        infile = open(infile, 'rb')
    asfile = AppleSingle(infile, verbose=verbose)
    asfile.tofile(outpath, resonly=resonly)