| @@ 154-163 (lines=10) @@ | ||
| 151 | * |
|
| 152 | * @return int the number of bytes in the file, or -1 on failure. |
|
| 153 | */ |
|
| 154 | public function length() |
|
| 155 | { |
|
| 156 | if (!$this->exists()) { |
|
| 157 | return -1; |
|
| 158 | } |
|
| 159 | ||
| 160 | return ($result = filesize($this->path)) !== false ? $result : -1; |
|
| 161 | } |
|
| 162 | ||
| 163 | /** |
|
| 164 | * Returns the time of the last modification as a unixtimestap, or -1 on failure. |
|
| 165 | * |
|
| 166 | * @return int the time of the last modification as a unixtimestap, or -1 on failure. |
|
| @@ 168-177 (lines=10) @@ | ||
| 165 | * |
|
| 166 | * @return int the time of the last modification as a unixtimestap, or -1 on failure. |
|
| 167 | */ |
|
| 168 | public function lastModified() |
|
| 169 | { |
|
| 170 | if (!$this->exists()) { |
|
| 171 | return -1; |
|
| 172 | } |
|
| 173 | ||
| 174 | return ($result = filemtime($this->path)) !== false ? $result : -1; |
|
| 175 | } |
|
| 176 | ||
| 177 | /** |
|
| 178 | * Returns an iterator with the files and directories in the current directory. |
|
| 179 | * |
|
| 180 | * @param bool $recursive = false |
|