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


require_once 'Net/FTP.php';

mixed Net_FTP::size ( string $file )


gives you the size of a file bytes.


  • string $file - The file to check.

Return value

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


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.


This function can not be called statically.


Using size()

returns the last modification date of a file. (Previous) returns the listing of a directory in a specified way. (Next)
Last updated: Sat, 16 Feb 2019 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report.
View this page in:
  • English

User Notes:

There are no user contributed notes for this page.