File manipulation in Lua is done on either implicit or explicit file descriptors. We will focus on using explicit file descriptors to perform most of the operations.
Note
If we work with implicit file descriptors by default, Lua will use stdin
and stdout
respectively. Alternatively, we can set the output and input descriptors with io.output
and io.input
, respectively.