ftp_size

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Returns the size of the given file
<?php ftp_size(FTP\Connection $ftp, string $filename): int
<?php         $location = $this->prefixer->prefixPath($path);

        $success = @ftp_delete($connection, $location);



        if ($success === false && ftp_size($connection, $location) !== -1) {

            throw UnableToDeleteFile::atLocation($path, 'the file still exists');

        }

    }
<?php     {

        $location = $this->prefixer->prefixPath($path);

        $connection = $this->connection();

        $fileSize = @ftp_size($connection, $location);



        if ($fileSize < 0) {

            throw UnableToRetrieveMetadata::fileSize($path, error_get_last()['message'] ?? '');