private byte[] OpenDir(uint requestId, string directoryPath) { SFTPPacket packet = new SFTPPacket(SFTPPacketType.SSH_FXP_OPENDIR) .WriteUInt32(requestId) .WriteAsString(_encoding.GetBytes(directoryPath)); return WaitHandle(packet, requestId); }