summaryrefslogtreecommitdiffstats
path: root/stdlib/getput.tl
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/getput.tl')
-rw-r--r--stdlib/getput.tl17
1 files changed, 17 insertions, 0 deletions
diff --git a/stdlib/getput.tl b/stdlib/getput.tl
index fd62f911..8bc30598 100644
--- a/stdlib/getput.tl
+++ b/stdlib/getput.tl
@@ -62,6 +62,11 @@
(put-jsonl obj s flat-p))
t)
+(defun put-objects (list : (s *stdout*))
+ (each ((obj list))
+ (prinl obj s)
+ t))
+
(defun file-get (name : mopt)
(with-stream (s (open-file name `r@mopt`))
(read s)))
@@ -74,6 +79,18 @@
(with-stream (s (open-file name `a@mopt`))
(prinl obj s)))
+(defun file-get-objects (name : mopt (err-stream :))
+ (with-stream (s (open-file name `r@mopt`))
+ (read-objects s err-stream)))
+
+(defun file-put-objects (name seq : mopt)
+ (with-stream (s (open-file name `w@mopt`))
+ (put-objects seq s)))
+
+(defun file-append-objects (name seq : mopt)
+ (with-stream (s (open-file name `a@mopt`))
+ (put-objects seq s)))
+
(defun file-get-string (name : mopt)
(with-stream (s (open-file name `r@mopt`))
(get-string s)))