| 1 | <?php |
||
| 11 | class File |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var FileLocation |
||
| 15 | */ |
||
| 16 | private $location; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var FileContent |
||
| 20 | */ |
||
| 21 | private $content; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @param FileLocation $location |
||
| 25 | * @param FileContent $content |
||
| 26 | */ |
||
| 27 | 1 | public function __construct(FileLocation $location, FileContent $content) |
|
| 32 | |||
| 33 | /** |
||
| 34 | * @return FileLocation The location of the file on disk |
||
| 35 | */ |
||
| 36 | 1 | public function getLocation() |
|
| 40 | |||
| 41 | /** |
||
| 42 | * @return FileContent Raw content of the file |
||
| 43 | */ |
||
| 44 | 1 | public function getRawContent() |
|
| 48 | |||
| 49 | /** |
||
| 50 | * @return bool |
||
| 51 | */ |
||
| 52 | public function exists() |
||
| 56 | |||
| 57 | /** |
||
| 58 | * @return bool |
||
| 59 | */ |
||
| 60 | public function isWritable() |
||
| 64 | |||
| 65 | /** |
||
| 66 | * @return string |
||
| 67 | */ |
||
| 68 | 1 | public function __toString() |
|
| 72 | } |
||
| 73 |