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