mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
File::info() return the file size.
This commit is contained in:
parent
0bb9f3f99e
commit
318ea27c8d
2 changed files with 4 additions and 1 deletions
|
@ -74,7 +74,7 @@ class FileTest extends CakeTestCase {
|
|||
$result = $this->File->info();
|
||||
$expecting = array(
|
||||
'dirname' => dirname(__FILE__), 'basename' => basename(__FILE__),
|
||||
'extension' => 'php', 'filename' =>'FileTest'
|
||||
'extension' => 'php', 'filename' =>'FileTest', 'filesize' => filesize($file)
|
||||
);
|
||||
$this->assertEquals($expecting, $result);
|
||||
|
||||
|
|
|
@ -290,6 +290,9 @@ class File {
|
|||
if (!isset($this->info['filename'])) {
|
||||
$this->info['filename'] = $this->name();
|
||||
}
|
||||
if (!isset($this->info['filesize'])) {
|
||||
$this->info['filesize'] = $this->size();
|
||||
}
|
||||
return $this->info;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue