| @@ 211-220 (lines=10) @@ | ||
| 208 | * |
|
| 209 | * @return bool |
|
| 210 | */ |
|
| 211 | protected function createFile(string $path, $contents, bool $inBasePath = false) : bool |
|
| 212 | { |
|
| 213 | $path = $this->getPath($path, $inBasePath); |
|
| 214 | ||
| 215 | if (!$this->disk->exists($path)) { |
|
| 216 | return $this->disk->put($path, $contents); |
|
| 217 | } |
|
| 218 | ||
| 219 | return false; |
|
| 220 | } |
|
| 221 | ||
| 222 | /** |
|
| 223 | * @param string $path |
|
| @@ 228-237 (lines=10) @@ | ||
| 225 | * |
|
| 226 | * @return bool |
|
| 227 | */ |
|
| 228 | protected function createDir(string $path, bool $inBasePath = false) : bool |
|
| 229 | { |
|
| 230 | $path = $this->getPath($path, $inBasePath); |
|
| 231 | ||
| 232 | if (!$this->disk->exists($path)) { |
|
| 233 | return $this->disk->makeDirectory($path); |
|
| 234 | } |
|
| 235 | ||
| 236 | return false; |
|
| 237 | } |
|
| 238 | ||
| 239 | /** |
|
| 240 | * @param string $path |
|
| @@ 158-167 (lines=10) @@ | ||
| 155 | * |
|
| 156 | * @return bool |
|
| 157 | */ |
|
| 158 | final protected function createFile(string $path, $contents) : bool |
|
| 159 | { |
|
| 160 | $path = $this->getPath($path); |
|
| 161 | ||
| 162 | if (!$this->disk->exists($path)) { |
|
| 163 | return $this->disk->put($path, $contents); |
|
| 164 | } |
|
| 165 | ||
| 166 | return false; |
|
| 167 | } |
|
| 168 | ||
| 169 | /** |
|
| 170 | * @param string $path |
|