<?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'] ?? '');