Version: 4.2.1
4.9 Node Contents
Opens an input port from which the contents of the file at
path below root can be read.
Opens an output port to which the new contents of the file at
path below root can be written.
If deltify is not #f, writing data to the stream automatically generated a delta to the previous contents of the file. Otherwise, the new revision stores the full new contents of the file.
base-checksum and result-checksum are checksums of the file’s content before and after the change. These arguments may be ignored, even if provided, but if provided, they must be correct.
(call-with-fs-input-file root path proc) → any |
root : fs-root? |
path : path-string? |
proc : (-> input-port? any) |
Calls fs-open-input-file with the root and
path arguments and passes the resulting port to
proc.
When proc returns, the newly opened port is closed.
The result of proc is the result of the call-with-fs-input-file call.
| ||||||||||||||||||||||||
→ any | ||||||||||||||||||||||||
root : fs-root? | ||||||||||||||||||||||||
path : path-string? | ||||||||||||||||||||||||
proc : (-> output-port? any) | ||||||||||||||||||||||||
deltify? : any/c = #t | ||||||||||||||||||||||||
base-checksum : (or/c bytes? #f) = #f | ||||||||||||||||||||||||
result-checksum : (or/c bytes? #f) = #f |
Calls fs-open-output-file with the root,
path, deltify?, base-checksum and
result-checksum arguments and passes the resulting port to
proc.
When proc returns, the newly opened port is closed.
The result of proc is the result of the call-with-fs-output-file call.
(call-with-fs-input-file* root path proc) → any |
root : fs-root? |
path : path-string? |
proc : (-> input-port? any) |
Like call-with-fs-input-file, but the newly opened port is
closed whenever the dynamic scope of call-with-fs-input-file*
is left.
| ||||||||||||||||||||||||
→ any | ||||||||||||||||||||||||
root : fs-root? | ||||||||||||||||||||||||
path : path-string? | ||||||||||||||||||||||||
proc : (-> output-port? any) | ||||||||||||||||||||||||
deltify? : any/c = #t | ||||||||||||||||||||||||
base-checksum : (or/c bytes? #f) = #f | ||||||||||||||||||||||||
result-checksum : (or/c bytes? #f) = #f |
Like call-with-fs-output-file, but the newly opened port is
closed whenever the dynamic scope of call-with-fs-output-file*
is left.
(with-fs-input-from-file root path thunk) → any |
root : fs-root? |
path : path-string? |
thunk : (-> any) |
Like call-with-fs-input-file*, but the newly opened
port is not passed to thunk but rather installed as the
current input port using a parameterization.
| ||||||||||||||||||||||||
→ any | ||||||||||||||||||||||||
root : fs-root? | ||||||||||||||||||||||||
path : path-string? | ||||||||||||||||||||||||
thunk : (-> any) | ||||||||||||||||||||||||
deltify? : any/c = #t | ||||||||||||||||||||||||
base-checksum : (or/c bytes? #f) = #f | ||||||||||||||||||||||||
result-checksum : (or/c bytes? #f) = #f |
Like call-with-fs-output-file*, but the newly opened
port is not passed to thunk but rather installed as the
current output port using a parameterization.