private SftpATTRS _lstat(String path) throws SftpException {
try {
sendLSTAT(Util.str2byte(path, _fileEncoding));
readResponse();
if( _header.type != SSH_FXP_ATTRS ) {
throw new SftpException(SSH_FX_FAILURE, "Invalid FXP response: "+_header.type);
}
return SftpATTRS.getATTR(_buffer);
} catch(SftpException e) {
throw e;
} catch(Exception e) {
throw new SftpException(SSH_FX_FAILURE, "Failed to lstat path: "+path, e);
}
}