SFTP: Revamp file type detection and add truncate method
SFTP: Revamp file type detection and add truncate method

Also clean up some code

creatuity/phpseclib,paragonie-scott/phpseclib,splitice/phpseclib,kenichiii/phpseclib,creatuity/phpseclib,thaigialai1987/phpseclib,metaclassing/phpseclib,danog/phpseclib,kenichiii/phpseclib,phpseclib/phpseclib-php5,metaclassing/phpseclib,melya/phpseclib,ericariyanto/phpseclib,paragonie-scott/phpseclib,terrafrost/phpseclib,splitice/phpseclib,danog/phpseclib,melya/phpseclib,thaigialai1987/phpseclib,ericariyanto/phpseclib,phpseclib/phpseclib,phpseclib/phpseclib-php5