tur/r7rs/file
(scheme file): file ports and the file system.
An on-demand R7RS library (see stdlib/r7rs/time.tur). file-exists? and delete-file carry their own inline C with interpreter twins, for the reason process-context.tur gives; the file ports (R8) are the prelude's port layer over a FILE, and a failed open raises an error object that file-error? recognizes.
Since: r7rs-lang-plan R7 (file ports: R8)
r7rs-file-exists-c__
(r7rs-file-exists-c__ [path :cstr] :bool)
#t when the path names anything that exists.
r7rs-file-exists?
(r7rs-file-exists? [path] :bool)
T3: a path is any Scheme string (a mutable one converts, as at every cstr seam).
r7rs-unlink__
(r7rs-unlink__ [path :cstr] :bool)
r7rs-delete-file
(r7rs-delete-file [path0] :any)
remove the file; a failure raises an error object that file-error? recognizes.
r7rs-delete-file-go__
(r7rs-delete-file-go__ [path :cstr] :any)
r7rs-open-file__
(r7rs-open-file__ [path :cstr mode :cstr input :bool binary :bool] :any)
a file port, or a file error naming the path.
r7rs-open-input-file
(r7rs-open-input-file [path] :any)
textual file ports. An output file is created, or truncated if it exists.
r7rs-open-output-file
(r7rs-open-output-file [path] :any)
r7rs-open-binary-input-file
(r7rs-open-binary-input-file [path] :any)
binary ones.
r7rs-open-binary-output-file
(r7rs-open-binary-output-file [path] :any)
r7rs-call-with-input-file
(r7rs-call-with-input-file [path proc] :any)
(proc port) on the opened file, closed after.
r7rs-call-with-output-file
(r7rs-call-with-output-file [path proc] :any)
r7rs-with-input-from-file
(r7rs-with-input-from-file [path thunk] :any)
thunk with the file as the current input port (parameterize, so an escape restores it); the file is closed after.
r7rs-with-output-to-file
(r7rs-with-output-to-file [path thunk] :any)