From 2725e560dacafa8e5ad6a17faf8be405b7ad5a4a Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Wed, 28 Sep 2016 18:13:03 -0400 Subject: [PATCH] Added documentation --- docs/api/scheme/file.md | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/docs/api/scheme/file.md b/docs/api/scheme/file.md index e476b812..acd7776e 100644 --- a/docs/api/scheme/file.md +++ b/docs/api/scheme/file.md @@ -4,10 +4,31 @@ The `(scheme file)` library provides procedures for accessing files. For more information see the [R7RS Scheme Specification](../../r7rs.pdf). -- `call-with-input-file` -- `call-with-output-file` -- `delete-file` -- `file-exists?` -- `with-input-from-file` -- `with-output-to-file` +- [`call-with-input-file` ](#call-with-input-file) +- [`call-with-output-file`](#call-with-output-file) +- [`with-input-from-file`](#with-input-from-file) +- [`with-output-to-file`](#with-output-to-file) +#call-with-input-file + + (call-with-input-file string proc) + +Open given filename for input, pass the resulting port to `proc`, and close the port after `proc` returns. + +#call-with-output-file + + (call-with-output-file string proc) + +Open given filename for output, pass the resulting port to `proc`, and close the port after `proc` returns. + +#with-input-from-file + + (with-input-from-file string thunk) + +Open given filename for input and change the current input to that port for the duration of `thunk`. + +#with-output-to-file + + (with-output-to-file string thunk) + +Open given filename for output and change the current output to that port for the duration of `thunk`.