<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_file(project: str, environment: str, feature: str, state: str) -> None: """ Create file to replay. Create file with ``rc`` command that will be called against the LaunchDarkly API when ``rc playback`` is called from the main CLI. :param project: LaunchDarkly Project :param environment: LaunchDarkly Environment :param feature: LaunchDarkly Feature :param state: State to update feature flag """

    check_local()
    save_path = './replay/toDo/'
    filename = '{0}.txt'.format(str(uuid.uuid1()))
    complete_name = os.path.join(save_path, filename)

    with open(complete_name, 'w') as filename:
        filename.write('rc update-ld-api -p {0} -e {1} -f {2} -s {3}'.format(
            project,
            environment,
            feature,
            state
        ))