Passed
Push — master ( ceafce...768b01 )
by Roeland
22:28 queued 09:18
created

UploadFile::getETag()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 2
rs 10
1
<?php
2
3
declare(strict_types=1);
4
/**
5
 * @copyright Copyright (c) 2020, Roeland Jago Douma <[email protected]>
6
 *
7
 * @author Roeland Jago Douma <[email protected]>
8
 *
9
 * @license GNU AGPL version 3 or any later version
10
 *
11
 * This program is free software: you can redistribute it and/or modify
12
 * it under the terms of the GNU Affero General Public License as
13
 * published by the Free Software Foundation, either version 3 of the
14
 * License, or (at your option) any later version.
15
 *
16
 * This program is distributed in the hope that it will be useful,
17
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19
 * GNU Affero General Public License for more details.
20
 *
21
 * You should have received a copy of the GNU Affero General Public License
22
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
23
 *
24
 */
25
26
namespace OCA\DAV\Upload;
27
28
use OCA\DAV\Connector\Sabre\File;
29
use Sabre\DAV\IFile;
30
31
class UploadFile implements IFile {
32
33
	/**  @var File */
34
	private $file;
35
36
	public function __construct(File $file) {
37
		$this->file = $file;
38
	}
39
40
	public function put($data) {
41
		return $this->file->put($data);
42
	}
43
44
	public function get() {
45
		return $this->file->get();
46
	}
47
48
	public function getContentType() {
49
		return $this->file->getContentType();
50
	}
51
52
	public function getETag() {
53
		return $this->file->getETag();
54
	}
55
56
	public function getSize() {
57
		return $this->file->getSize();
58
	}
59
60
	public function delete() {
61
		$this->file->delete();
62
	}
63
64
	public function getName() {
65
		return $this->file->getName();
66
	}
67
68
	public function setName($name) {
69
		$this->file->setName($name);
70
	}
71
72
	public function getLastModified() {
73
		return $this->file->getLastModified();
74
	}
75
}
76