Skip to content

roblambell/ExtendedSPLFileInfo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

ExtendedSPLFileInfo

PHP class extends SPLFileInfo

Methods

  • getRealSize() - size of directory contents (recursive) or file if isFile

  • getFileMTime() - MTime of most recent directory contents (recursive) or file if isFile

  • getHumanSize() - human readable filesize, %.2f {$factor}. default from $this->getRealSize()

Usage

$iterator = new FilesystemIterator(dirname(__FILE__));
$iterator->setInfoClass('ExtendedSPLFileInfo');
foreach ($iterator as $file) {
	echo $file->getRealSize() . PHP_EOL;
}

About

PHP class extends SPLFileInfo

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages