function _stat($filename, $type)
    {
        // SFTPv4+ adds an additional 32-bit integer field - flags - to the following:
        $packet = pack('Na*', strlen($filename), $filename);
        if (!$this->_send_sftp_packet($type, $packet)) {
            return false;
        }

        $response = $this->_get_sftp_packet();
        switch ($this->packet_type) {
            case NET_SFTP_ATTRS:
                return $this->_parseAttributes($response);
            case NET_SFTP_STATUS:
                $this->_logError($response);
                return false;
        }

        user_error('Expected SSH_FXP_ATTRS or SSH_FXP_STATUS');
        return false;
    }
function _stat($filename, $type)
    {
        // SFTPv4+ adds an additional 32-bit integer field - flags - to the following:
        $packet = pack('Na*', strlen($filename), $filename);
        if (!$this->_send_sftp_packet($type, $packet)) {
            return false;
        }

        $response = $this->_get_sftp_packet();
        switch ($this->packet_type) {
            case NET_SFTP_ATTRS:
                return $this->_parseAttributes($response);
            case NET_SFTP_STATUS:
                $this->_logError($response);
                return false;
        }

        user_error('Expected SSH_FXP_ATTRS or SSH_FXP_STATUS');
        return false;
    }
function _stat ( $ filename , $ type ) { // SFTPv4+ adds an additional 32-bit integer field - flags - to the following: $ packet = pack ( 'Na*' , strlen ( $ filename ) , $ filename ) ; if ( ! $ this -> _send_sftp_packet ( $ type , $ packet ) ) { return false ; } $ response = $ this -> _get_sftp_packet ( ) ; switch ( $ this -> packet_type ) { case NET_SFTP_ATTRS : return $ this -> _parseAttributes ( $ response ) ; case NET_SFTP_STATUS : $ this -> _logError ( $ response ) ; return false ; } user_error ( 'Expected SSH_FXP_ATTRS or SSH_FXP_STATUS' ) ; return false ; }
Returns general information about a file or symbolic link

Determines information without calling \phpseclib\Net\SFTP::realpath().
The second parameter can be either NET_SFTP_STAT or NET_SFTP_LSTAT.

@param string $filename
@param int $type
@return mixed
@access private
Returns general information about a file or symbolic link