we need batch io for htdp/2e

svn: r14504
This commit is contained in:
Matthias Felleisen 2009-04-14 03:00:41 +00:00
parent dc6be52955
commit 8476e13064
3 changed files with 31 additions and 1 deletions

View File

@ -7,4 +7,5 @@
@local-table-of-contents[]
@include-section["batch-io.scrbl"]
@include-section["universe.scrbl"]

View File

@ -0,0 +1,29 @@
#lang scribble/doc
@(require scribble/manual "shared.ss"
(for-label scheme teachpack/2htdp/batch-io))
@(require scribble/struct)
@; -----------------------------------------------------------------------------
@teachpack["batch-io"]{Batch Input/Output}
@author{Matthias Felleisen}
@defmodule[#:require-form beginner-require 2htdp/batch-io]
The batch-io teachpack introduces two functions: @scheme[read-file] and
@scheme[write-file]. It facilitates the reading and writing of entire files
in one batch.
@defproc[(read-file [f (and/c string? file-exists?)]) string?]{
reads the content of file @scheme[f], located in the samd folder
(directory) as the program, and produces it as a string. If @scheme[f]
doesn't exist, the function signals an error.
}
@defproc[(write-file [f string?] [cntnt string?]) boolean?]{
turns @scheme[cntnt] into the content of file @scheme[f], located in the
same folder (directory) as the program. If the file exists when the
function is called, the function produces @scheme[true]; otherwise it
produces @scheme[false].}

View File

@ -21,7 +21,7 @@
@; -----------------------------------------------------------------------------
@title{Worlds and the Universe}
@teachpack["universe"]{Worlds and the Universe}
@author{Matthias Felleisen}