-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathBase.php
More file actions
50 lines (39 loc) · 991 Bytes
/
Base.php
File metadata and controls
50 lines (39 loc) · 991 Bytes
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
50
<?php
/**
* @author Ioannis Botis
* @date 24/1/2017
* @version: Base.php 11:32 pm
* @since 24/1/2017
*/
namespace Backup\Destination;
/**
* Defines basic functions for various backup client storages.
* eg. Local, ftp, dropbox.
*
* Interface Base
* @package Backup\Destination
*/
interface Base
{
const LOCAL_FOLDER_TYPE = 1;
const FTP_TYPE = 2;
const DROPBOX_TYPE = 3;
public function __construct(array $settings);
public function getType();
public function getPath();
public function getSettings();
public function isEmpty();
public function canAccess();
/**
* @param string $dir
* @param boolean $recursive
* @return mixed
*/
public function listContents($dir = '', $recursive = false);
/**
* @param string $file The path to the file.
* @return string|false The file contents or false on failure.
*/
public function read($file);
public function write($filename, $contents);
}