src/S3/S3ClientTrait.php
private function checkExistenceWithCommand(CommandInterface $command)
    {
        try {
            $this->execute($command);
            return true;
        } catch (S3Exception $e) {
            if ($e->getAwsErrorCode() == 'AccessDenied') {
                return true;
            }
            if ($e->getStatusCode() >= 500) {
                throw $e;
            }
            return false;
        }
    }
private function checkExistenceWithCommand(CommandInterface $command)
    {
        try {
            $this->execute($command);
            return true;
        } catch (S3Exception $e) {
            if ($e->getAwsErrorCode() == 'AccessDenied') {
                return true;
            }
            if ($e->getStatusCode() >= 500) {
                throw $e;
            }
            return false;
        }
    }
private function checkExistenceWithCommand ( CommandInterface $ command ) { try { $ this -> execute ( $ command ) ; return true ; } catch ( S3Exception $ e ) { if ( $ e -> getAwsErrorCode ( ) == 'AccessDenied' ) { return true ; } if ( $ e -> getStatusCode ( ) >= 500 ) { throw $ e ; } return false ; } }
Determines whether or not a resource exists using a command

@param CommandInterface $command Command used to poll for the resource

@return bool
@throws S3Exception|\Exception if there is an unhandled exception
Determines whether or not a resource exists using a command