| 1 | <?php |
||
| 20 | final class File extends BaseFilesystemItem |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * Get a new File object for another file relative to this file. |
||
| 24 | * |
||
| 25 | * @param string $path |
||
| 26 | * |
||
| 27 | * @return File |
||
| 28 | */ |
||
| 29 | 11 | public function createFileForRelativePath($path) |
|
| 33 | |||
| 34 | /** |
||
| 35 | * Get the name of the file without an extension. |
||
| 36 | * |
||
| 37 | * @param null $suffix this value will be discarded and is only needed to be able to override the \SplFileInfo |
||
| 38 | * definition |
||
| 39 | * |
||
| 40 | * @since 0.2.0 |
||
| 41 | * |
||
| 42 | * @return string |
||
| 43 | */ |
||
| 44 | 97 | public function getBasename($suffix = null) |
|
| 48 | |||
| 49 | /** |
||
| 50 | * Get the name of the with the extension. |
||
| 51 | * |
||
| 52 | * @since 0.2.0 |
||
| 53 | * |
||
| 54 | * @return string |
||
| 55 | */ |
||
| 56 | 101 | public function getFilename() |
|
| 60 | |||
| 61 | /** |
||
| 62 | * Get the contents of this file. |
||
| 63 | * |
||
| 64 | * @since 0.2.0 |
||
| 65 | * |
||
| 66 | * @throws \RuntimeException when the file could not be read |
||
| 67 | * |
||
| 68 | * @return string |
||
| 69 | */ |
||
| 70 | 157 | public function getContents() |
|
| 87 | } |
||
| 88 |