Verzeichnisstruktur phpBB-3.3.15
- Veröffentlicht
- 28.08.2024
So funktioniert es
|
Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück |
Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
FileNotWritableException.php
01 <?php
02
03 declare(strict_types=1);
04
05 namespace ProxyManager\Exception;
06
07 use UnexpectedValueException;
08
09 /**
10 * Exception for non writable files
11 *
12 * @author Marco Pivetta <ocramius@gmail.com>
13 * @license MIT
14 */
15 class FileNotWritableException extends UnexpectedValueException implements ExceptionInterface
16 {
17 public static function fromInvalidMoveOperation(string $fromPath, string $toPath) : self
18 {
19 return new self(sprintf(
20 'Could not move file "%s" to location "%s": '
21 . 'either the source file is not readable, or the destination is not writable',
22 $fromPath,
23 $toPath
24 ));
25 }
26
27 /**
28 * @deprecated this method is unused, and will be removed in ProxyManager 3.0.0
29 */
30 public static function fromNonWritableLocation($path) : self
31 {
32 $messages = [];
33 $destination = realpath($path);
34
35 if (! $destination) {
36 $messages[] = 'path does not exist';
37 }
38
39 if ($destination && ! is_file($destination)) {
40 $messages[] = 'exists and is not a file';
41 }
42
43 if ($destination && ! is_writable($destination)) {
44 $messages[] = 'is not writable';
45 }
46
47 return new self(sprintf('Could not write to path "%s": %s', $path, implode(', ', $messages)));
48 }
49 }
50