def METHOD_NAME(folder, default=False, create=False):
    """A path to an directory or None.
    Takes a CSIDL instance as folder.
    """
    if default:
        flags = SHGFPType.DEFAULT
    else:
        flags = SHGFPType.CURRENT
    if create:
        folder |= CSIDLFlag.CREATE
    # we don't want env vars
    folder |= CSIDLFlag.DONT_UNEXPAND
    buffer_ = ctypes.create_unicode_buffer(MAX_PATH)
    try:
        result = SHGetFolderPathW(0, folder, 0, flags, buffer_)
    except WindowsError:
        return None
    if result != S_OK:
        return None
    return buffer_.value