1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Hyde\Framework\Foundation\Concerns; |
4
|
|
|
|
5
|
|
|
/** |
6
|
|
|
* @internal Single-use trait for the HydeKernel class. |
7
|
|
|
* |
8
|
|
|
* @see \Hyde\Framework\HydeKernel |
9
|
|
|
*/ |
10
|
|
|
trait ForwardsFilesystem |
11
|
|
|
{ |
12
|
|
|
public function path(string $path = ''): string |
13
|
|
|
{ |
14
|
|
|
return $this->filesystem->path($path); |
15
|
|
|
} |
16
|
|
|
|
17
|
|
|
public function vendorPath(string $path = ''): string |
18
|
|
|
{ |
19
|
|
|
return $this->filesystem->vendorPath($path); |
20
|
|
|
} |
21
|
|
|
|
22
|
|
|
public function copy(string $from, string $to): bool |
23
|
|
|
{ |
24
|
|
|
return $this->filesystem->copy($from, $to); |
25
|
|
|
} |
26
|
|
|
|
27
|
|
|
public function touch(string|array $path): bool |
28
|
|
|
{ |
29
|
|
|
return $this->filesystem->touch($path); |
30
|
|
|
} |
31
|
|
|
|
32
|
|
|
public function unlink(string|array $path): bool |
33
|
|
|
{ |
34
|
|
|
return $this->filesystem->unlink($path); |
35
|
|
|
} |
36
|
|
|
|
37
|
|
|
public function getModelSourcePath(string $model, string $path = ''): string |
38
|
|
|
{ |
39
|
|
|
return $this->filesystem->getModelSourcePath($model, $path); |
40
|
|
|
} |
41
|
|
|
|
42
|
|
|
public function getBladePagePath(string $path = ''): string |
43
|
|
|
{ |
44
|
|
|
return $this->filesystem->getBladePagePath($path); |
45
|
|
|
} |
46
|
|
|
|
47
|
|
|
public function getMarkdownPagePath(string $path = ''): string |
48
|
|
|
{ |
49
|
|
|
return $this->filesystem->getMarkdownPagePath($path); |
50
|
|
|
} |
51
|
|
|
|
52
|
|
|
public function getMarkdownPostPath(string $path = ''): string |
53
|
|
|
{ |
54
|
|
|
return $this->filesystem->getMarkdownPostPath($path); |
55
|
|
|
} |
56
|
|
|
|
57
|
|
|
public function getDocumentationPagePath(string $path = ''): string |
58
|
|
|
{ |
59
|
|
|
return $this->filesystem->getDocumentationPagePath($path); |
60
|
|
|
} |
61
|
|
|
|
62
|
|
|
public function sitePath(string $path = ''): string |
63
|
|
|
{ |
64
|
|
|
return $this->filesystem->sitePath($path); |
65
|
|
|
} |
66
|
|
|
|
67
|
|
|
public function pathToRelative(string $path): string |
68
|
|
|
{ |
69
|
|
|
return $this->filesystem->pathToRelative($path); |
70
|
|
|
} |
71
|
|
|
} |
72
|
|
|
|