(w/outfile o f
(let i ($.make-limited-input-port req!in n)
(after ($.copy-port i o)
close.i)))
For all I know, closing i may not be necessary:
(w/outfile o f
($.copy-port ($.make-limited-input-port req!in n) o))
Note that this copies n bytes. The code you posted deals with n characters for some reason, even though Arc provides 'readb and 'writeb for dealing with bytes.