1<?php
2/**
3 *
4 * This file is part of the phpBB Forum Software package.
5 *
6 * @copyright (c) phpBB Limited <https://www.phpbb.com>
7 * @license GNU General Public License, version 2 (GPL-2.0)
8 *
9 * For full copyright and license information, please see
10 * the docs/CREDITS.txt file.
11 *
12 */
13
14namespace phpbb\install\helper\file_updater;
15
16interface file_updater_interface
17{
18	/**
19	 * Deletes a file
20	 *
21	 * @param string	$path_to_file	Path to the file to delete
22	 */
23	public function delete_file($path_to_file);
24
25	/**
26	 * Creates a new file
27	 *
28	 * @param string	$path_to_file_to_create	Path to the new file's location
29	 * @param string	$source					Path to file to copy or string with the new file's content
30	 * @param bool		$create_from_content	Whether or not to use $source as the content, false by default
31	 */
32	public function create_new_file($path_to_file_to_create, $source, $create_from_content = false);
33
34	/**
35	 * Update file
36	 *
37	 * @param string	$path_to_file_to_update	Path to the file's location
38	 * @param string	$source					Path to file to copy or string with the new file's content
39	 * @param bool		$create_from_content	Whether or not to use $source as the content, false by default
40	 */
41	public function update_file($path_to_file_to_update, $source, $create_from_content = false);
42
43	/**
44	 * Returns the name of the file updater method
45	 *
46	 * @return string
47	 */
48	public function get_method_name();
49}
50