Disk::link()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 2
crap 1
1
<?php
2
3
namespace Dazzle\Filesystem;
4
5
use Dazzle\Filesystem\Driver\DriverInterface;
6
use Dazzle\Loop\LoopInterface;
7
8
class Disk implements DiskInterface
9
{
10
    /**
11
     * @var DriverInterface
12
     */
13
    protected $driver;
14
15
    /**
16
     * @param DriverInterface $driver
17
     */
18 42
    public function __construct(DriverInterface $driver)
19
    {
20 42
        $this->driver = $driver;
21 42
    }
22
23
    /**
24
     * @override
25
     * @inheritDoc
26
     */
27 2
    public function setLoop(LoopInterface $loop = null)
28
    {
29 2
        $this->driver->setLoop($loop);
30 2
    }
31
32
    /**
33
     * @override
34
     * @inheritDoc
35
     */
36 2
    public function getLoop()
37
    {
38 2
        return $this->driver->getLoop();
39
    }
40
41
    /**
42
     * @override
43
     * @inheritDoc
44
     */
45 2
    public function access($path, $mode = 0755)
46
    {
47 2
        return $this->driver->access($path, $mode);
48
    }
49
50
    /**
51
     * @override
52
     * @inheritDoc
53
     */
54 2
    public function append($path, $data = '')
55
    {
56 2
        return $this->driver->append($path, $data);
57
    }
58
59
    /**
60
     * @override
61
     * @inheritDoc
62
     */
63 2
    public function chmod($path, $mode)
64
    {
65 2
        return $this->driver->chmod($path, $mode);
66
    }
67
68
    /**
69
     * @override
70
     * @inheritDoc
71
     */
72 2
    public function chown($path, $uid = -1, $gid = -1)
73
    {
74 2
        return $this->driver->chown($path, $uid, $gid);
75
    }
76
77
    /**
78
     * @override
79
     * @inheritDoc
80
     */
81 2
    public function exists($path)
82
    {
83 2
        return $this->driver->exists($path);
84
    }
85
86
    /**
87
     * @override
88
     * @inheritDoc
89
     */
90 2
    public function link($srcPath, $dstPath)
91
    {
92 2
        return $this->driver->link($srcPath, $dstPath);
93
    }
94
95
    /**
96
     * @override
97
     * @inheritDoc
98
     */
99 2
    public function ls($path)
100
    {
101 2
        return $this->driver->ls($path);
102
    }
103
104
    /**
105
     * @override
106
     * @inheritDoc
107
     */
108 2
    public function mkdir($path, $mode = 0755)
109
    {
110 2
        return $this->driver->mkdir($path, $mode);
111
    }
112
113
    /**
114
     * @override
115
     * @inheritDoc
116
     */
117 2
    public function prepend($path, $data = '')
118
    {
119 2
        return $this->driver->prepend($path, $data);
120
    }
121
122
    /**
123
     * @override
124
     * @inheritDoc
125
     */
126 2
    public function readlink($path)
127
    {
128 2
        return $this->driver->readlink($path);
129
    }
130
131
    /**
132
     * @override
133
     * @inheritDoc
134
     */
135 2
    public function realpath($path)
136
    {
137 2
        return $this->driver->realpath($path);
138
    }
139
140
    /**
141
     * @override
142
     * @inheritDoc
143
     */
144 2
    public function rename($srcPath, $dstPath)
145
    {
146 2
        return $this->driver->rename($srcPath, $dstPath);
147
    }
148
149
    /**
150
     * @override
151
     * @inheritDoc
152
     */
153 2
    public function rmdir($path)
154
    {
155 2
        return $this->driver->rmdir($path);
156
    }
157
158
    /**
159
     * @override
160
     * @inheritDoc
161
     */
162 2
    public function stat($path)
163
    {
164 2
        return $this->driver->stat($path);
165
    }
166
167
    /**
168
     * @override
169
     * @inheritDoc
170
     */
171 2
    public function symlink($srcPath, $dstPath)
172
    {
173 2
        return $this->driver->symlink($srcPath, $dstPath);
174
    }
175
176
    /**
177
     * @override
178
     * @inheritDoc
179
     */
180 2
    public function truncate($path, $len = 0)
181
    {
182 2
        return $this->driver->truncate($path, $len);
183
    }
184
185
    /**
186
     * @override
187
     * @inheritDoc
188
     */
189 2
    public function unlink($path)
190
    {
191 2
        return $this->driver->unlink($path);
192
    }
193
}
194