previousNet_FTP::mdtm() (Previous) (Next) Net_FTP::ls()next

View this page in Last updated: Sun, 18 Oct 2009
English | Brazilian Portuguese | Chinese | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Turkish

Net_FTP::size()

Net_FTP::size() – returns the size in bytes of a file.

Synopsis

require_once 'Net/FTP.php';

mixed Net_FTP::size ( string $file )

Description

gives you the size of a file bytes.

Parameter

  • string $file - The file to check.

Return value

mixed - the size of the given file on success, otherwise PEAR::Error.

Throws

The returned PEAR_Error object in case of an error is unspecific. You can ignore the errornumber and errormessage, because only "Connection failed" will be returned if the connection fails.

Note

This function can not be called statically.

Example

Using size()

<?php
     
    var_dump
($test->size('/foo/bar'));
    
?>
previousNet_FTP::mdtm() (Previous) (Next) Net_FTP::ls()next

Download Documentation Last updated: Sun, 18 Oct 2009
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.