<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def record_timestamp(pathname_full):
 """Record the timestamp of running in a dotfile."""

    if Settings.test or Settings.list_only or not Settings.record_timestamp:
        return
    if not Settings.follow_symlinks and os.path.islink(pathname_full):
        if Settings.verbose:
            print('Not setting timestamp because not following symlinks')
        return
    if not os.path.isdir(pathname_full):
        if Settings.verbose:
            print('Not setting timestamp for a non-directory')
        return

    record_filename_full = os.path.join(pathname_full, RECORD_FILENAME)
    try:
        with open(record_filename_full, 'w'):
            os.utime(record_filename_full, None)
        if Settings.verbose:
            print("Set timestamp: {}".format(record_filename_full))
        for fname in OLD_TIMESTAMPS:
            if fname.startswith(pathname_full) and \
               fname != record_filename_full:
                # only remove timestamps below the curent path
                # but don't remove the timestamp we just set!
                os.remove(fname)
                if Settings.verbose:
                    print('Removed old timestamp: {}'.format(fname))
    except IOError:
        print("Could not set timestamp in {}".format(pathname_full))