| @@ 144-153 (lines=10) @@ | ||
| 141 | * |
|
| 142 | * @return int the number of bytes in the file, or -1 on failure. |
|
| 143 | */ |
|
| 144 | public function count() |
|
| 145 | { |
|
| 146 | if (!$this->exists()) { |
|
| 147 | return -1; |
|
| 148 | } |
|
| 149 | ||
| 150 | return ($result = filesize($this->path)) !== false ? $result : -1; |
|
| 151 | } |
|
| 152 | ||
| 153 | /** |
|
| 154 | * Returns the time of the last modification as a unixtimestap, or -1 on failure. |
|
| 155 | * |
|
| 156 | * @return int the time of the last modification as a unixtimestap, or -1 on failure. |
|
| @@ 158-167 (lines=10) @@ | ||
| 155 | * |
|
| 156 | * @return int the time of the last modification as a unixtimestap, or -1 on failure. |
|
| 157 | */ |
|
| 158 | public function lastModified() |
|
| 159 | { |
|
| 160 | if (!$this->exists()) { |
|
| 161 | return -1; |
|
| 162 | } |
|
| 163 | ||
| 164 | return ($result = filemtime($this->path)) !== false ? $result : -1; |
|
| 165 | } |
|
| 166 | ||
| 167 | /** |
|
| 168 | * Returns an iterator with the files and directories in the current directory. |
|
| 169 | * |
|
| 170 | * @param bool $recursive = false |
|