1 | <?php |
||
23 | abstract class AbstractFilePath extends AbstractFileBlob |
||
24 | { |
||
25 | /** |
||
26 | * @var \SplFileInfo|null |
||
27 | */ |
||
28 | protected $file; |
||
29 | |||
30 | /** |
||
31 | * @return string |
||
32 | */ |
||
33 | public function __toString(): string |
||
37 | |||
38 | /** |
||
39 | * {@inheritdoc} |
||
40 | */ |
||
41 | public function getFile(): ?\SplFileInfo |
||
45 | |||
46 | /** |
||
47 | * {@inheritdoc} |
||
48 | */ |
||
49 | public function hasFile(): bool |
||
53 | |||
54 | /** |
||
55 | * {@inheritdoc} |
||
56 | */ |
||
57 | public function fileExists(): bool |
||
61 | |||
62 | /** |
||
63 | * {@inheritdoc} |
||
64 | */ |
||
65 | public function isFileReadable(): bool |
||
69 | |||
70 | /** |
||
71 | * {@inheritdoc} |
||
72 | */ |
||
73 | public function isFileWritable(): bool |
||
78 | |||
79 | /** |
||
80 | * @return self |
||
81 | */ |
||
82 | public function remove(): self |
||
94 | |||
95 | /** |
||
96 | * @return string|null |
||
97 | */ |
||
98 | protected function doGetContents(): ?string |
||
112 | |||
113 | /** |
||
114 | * @param string $contents |
||
115 | * @param bool $append |
||
116 | * |
||
117 | * @throws FileOperationException |
||
118 | */ |
||
119 | protected function doSetContents(string $contents, bool $append): void |
||
126 | |||
127 | /** |
||
128 | * @param string $path |
||
129 | * |
||
130 | * @return string |
||
131 | */ |
||
132 | protected static function makePathIfNotExists(string $path): string |
||
146 | |||
147 | /** |
||
148 | * @param string $file |
||
149 | * @param string $contents |
||
150 | * @param bool $append |
||
151 | */ |
||
152 | private static function dumpContentsForFile(string $file, string $contents, bool $append): void |
||
160 | } |
||
161 |