Completed
Pull Request — master (#140)
by
unknown
02:55
created

File::getFileInfo()   A

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
c 0
b 0
f 0
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace phpbu\App\Backup;
4
5
interface File
6
{
7
    /**
8
     * Return the filesize.
9
     *
10
     * @return integer
11
     */
12
    public function getSize(): int;
13
14
    /**
15
     * Return the filename.
16
     *
17
     * @return string
18
     */
19
    public function getFilename(): string;
20
21
    /**
22
     * Return the full path and filename.
23
     *
24
     * @return string
25
     */
26
    public function getPathname(): string;
27
28
    /**
29
     * Return last modified date as unix timestamp.
30
     *
31
     * @return integer
32
     */
33
    public function getMTime(): int;
34
35
    /**
36
     * Return whether the file is writable or not.
37
     *
38
     * @return boolean
39
     */
40
    public function isWritable(): bool;
41
42
    /**
43
     * Deletes the file.
44
     *
45
     * @throws \phpbu\App\Exception
46
     */
47
    public function unlink();
48
}