Create a Tty device on a given device path. The usual path is "/dev/tty".
Create a Tty device form a given file. This should support termios. One reason to do this is so that an explictly created file on /dev/tty can be used together with poll, select, epoll, and so forth. It must pass the isatty check.
Save current tty settings. These can be subsequently restored using restore.
Restore tty settings saved with save().
Make the terminal suitable for raw mode input. In this mode the terminal is not suitable for typical interactive shell use, but is good if absolute control over input is needed. After this, reads will block until one character is presented. (Same effect as 'blocking(true)'.
Read input. May return an empty slice if no data is present and blocking is disabled.
Write output.
Flush output.
Get window size.
Stop input scanning.
Close the tty device.
Start termio. This will open the device.
Resized returns true if the window was resized since last checked. Normally resize will force the window into non-blocking mode so that the caller can see the resize in a timely fashion. This is edge triggered (reading it will clear the value.)
Wake up any reader blocked in read().
PosixTty implements the TTY interface for POSIX systems, using a normal file descriptor and the termio facility found on such systems.