next up previous contents
Next: MLton.Thread Up: MLton Previous: MLton.Syslog   Contents

MLton.TextIO

signature MLTON_TEXT_IO =
   sig
      val inFd: TextIO.instream -> Posix.IO.file_desc
      val mkstemp: string -> string * TextIO.outstream
      val mkstemps: {prefix: string, suffix: string} -> string * TextIO.outstream
      val newIn: Posix.IO.file_desc -> TextIO.instream
      val newOut: Posix.IO.file_desc -> TextIO.outstream
      val outFd: TextIO.outstream -> Posix.IO.file_desc
   end

inFd ins

return the file descriptor corresponding to ins.

mkstemp s

like the C mkstemp function, generate and open a tempory file with prefix s. This should be used instead of OS.FileSys.tmpName, which has security risks.

mkstemps {prefix, suffix}

mkstemps is like mkstemp, except it has both a prefix and suffix.

newIn fd

create a new instream from file descriptor fd.

newOut

create a new outstream from file descriptor fd.

outFd out

return the file descriptor corresponding to out.