File descriptors can refer to many kinds of object:

  • terminal (keyboard / display)
  • files on disk
  • network connections
  • devices, e.g. sound card, camera
  • (but not threads or processes; use pid_t, tid_t)

These objects mostly support read() and write(), and some support additional operations:

  • seek(): seek within a file; i.e. when dealing with audio or video
  • ioctl(): for any other operation that doesn’t fit in these operations Could infer this is dynamically typed.