@@ -10,9 +10,9 @@ import fs.xdg
1010import host.os
1111import host.file
1212import host.directory
13+ import io
1314import system
1415import uuid
15- import writer
1616
1717import .utils_
1818
@@ -232,7 +232,7 @@ interface FileStore:
232232 save bytes / ByteArray
233233
234234 /**
235- Calls the given $block with a $writer .Writer.
235+ Calls the given $block with an $io .Writer.
236236
237237 The $block must write its chunks to the writer.
238238 The writer is closed after the block returns.
@@ -329,15 +329,15 @@ class FileStore_ implements FileStore:
329329 file .write-content bytes --path = file-path
330330
331331 /**
332- Calls the given $block with a $writer .Writer.
332+ Calls the given $block with a $io .Writer.
333333
334334 The $block must write its chunks to the writer.
335335 The writer is closed after the block returns.
336336 */
337337 save-via-writer [block ]:
338338 store_ : | file-path / string |
339339 stream := file .Stream .for-write file-path
340- w := writer . Writer stream
340+ w := stream . out
341341 try:
342342 block .call w
343343 finally:
@@ -463,9 +463,8 @@ atomic-move-directory_ source-path/string target-path/string -> none:
463463copy-file_ --source / string --target / string -> none :
464464 // TODO(florian): we want to keep the permissions of the original file,
465465 // except that we want to make the file read-only.
466- in := file .Stream .for-read source
467- out := file .Stream .for-write target
468- w := writer .Writer out
469- w .write-from in
470- in .close
471- out .close
466+ in-stream := file .Stream .for-read source
467+ out-stream := file .Stream .for-write target
468+ out-stream .out .write-from in-stream .in
469+ in-stream .close
470+ out-stream .close
0 commit comments