downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

DirectoryIterator::getType> <DirectoryIterator::getPerms
[edit] Last updated: Fri, 17 May 2013

view this page in

DirectoryIterator::getSize

(PHP 5)

DirectoryIterator::getSizeobtiene el tamaño de el elemento actual DirectoryIterator

Descripción

public int DirectoryIterator::getSize ( void )

Obtiene el tamaño del fichero de el elemento actual DirectoryIterator.

Parámetros

Esta función no tiene parámetros.

Valores devueltos

Devuelve el tamaño del fichero en bytes.

Ejemplos

Ejemplo #1 Ejemplo de DirectoryIterator::getSize()

<?php
$iterator 
= new DirectoryIterator(dirname(__FILE__));
foreach (
$iterator as $fileinfo) {
    if (
$fileinfo->isFile()) {
        echo 
$fileinfo->getFilename() . " " $fileinfo->getSize() . "\n";
    }
}
?>

El resultado del ejemplo sería algo similar a:

manzana.jpg 15385
banana.jpg 15190
ejemplo.php 170
pera.jpg 34406

Ver también



add a note add a note User Contributed Notes DirectoryIterator::getSize - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites