<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def main(requirements_file, skip_requirements_file, pipfile, skip_pipfile):
 # type: (str, bool, str, bool) -> None """Update the requirements.txt file and reformat the Pipfile."""

    pipfile_path = path.Path(pipfile)
    pf = load_pipfile(pipfile_path)

    if not skip_requirements_file:
        requirements_file_path = path.Path(requirements_file)
        update_requirements(requirements_file_path, pf)

    if not skip_pipfile:
        dump_pipfile(pipfile_path, pf)