open method
Opens a file for reading or/and writing.
Implementation
Future<SftpFile> open(
String path, {
SftpFileOpenMode mode = SftpFileOpenMode.read,
}) async {
final reply = await _sendOpen(path, mode, SftpFileAttrs());
if (reply is SftpHandlePacket) return SftpFile(this, reply.handle);
if (reply is! SftpStatusPacket) throw SftpError('Unexpected reply');
throw SftpStatusError.fromStatus(reply);
}