diff options
Diffstat (limited to 'stdlib/getput.tl')
-rw-r--r-- | stdlib/getput.tl | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/stdlib/getput.tl b/stdlib/getput.tl index e90f3b28..0cf751a1 100644 --- a/stdlib/getput.tl +++ b/stdlib/getput.tl @@ -141,49 +141,49 @@ (with-stream (s (open-file name `a@mopt`)) (put-jsons s seq flat-p))) -(defun command-get (cmd) - (with-stream (s (open-command cmd)) +(defun command-get (cmd : mopt) + (with-stream (s (open-command cmd `r@mopt`)) (read s))) -(defun command-put (cmd obj) - (with-stream (s (open-command cmd "w")) +(defun command-put (cmd obj : mopt) + (with-stream (s (open-command cmd `w@mopt`)) (prinl obj s))) -(defun command-get-string (cmd) - (with-stream (s (open-command cmd)) +(defun command-get-string (cmd : mopt) + (with-stream (s (open-command cmd `r@mopt`)) (get-string s))) -(defun command-put-string (cmd string) - (with-stream (s (open-command cmd "w")) +(defun command-put-string (cmd string : mopt) + (with-stream (s (open-command cmd `w@mopt`)) (put-string string s))) -(defun command-get-lines (cmd) - (get-lines (open-command cmd))) +(defun command-get-lines (cmd : mopt) + (get-lines (open-command cmd `r@mopt`))) -(defun command-put-lines (cmd lines) - (with-stream (s (open-command cmd "w")) +(defun command-put-lines (cmd lines : mopt) + (with-stream (s (open-command cmd `w@mopt`)) (put-lines lines s))) (defun command-get-buf (cmd : bytes (skip 0)) (with-stream (s (open-command cmd (if bytes "rbu" "rb"))) (sys:get-buf-common s bytes skip))) -(defun command-put-buf (cmd buf) - (with-stream (s (open-command cmd "wb")) +(defun command-put-buf (cmd buf : mopt) + (with-stream (s (open-command cmd `wb@mopt`)) (put-buf buf 0 s))) -(defun command-get-json (cmd) - (with-stream (s (open-command cmd)) +(defun command-get-json (cmd : mopt) + (with-stream (s (open-command cmd `r@mopt`)) (get-json s))) -(defun command-put-json (cmd obj : flat-p) - (with-stream (s (open-command cmd "w")) +(defun command-put-json (cmd obj : flat-p mopt) + (with-stream (s (open-command cmd `w@mopt`)) (put-jsonl obj s flat-p))) -(defun command-get-jsons (cmd) - (with-stream (s (open-command cmd)) +(defun command-get-jsons (cmd : mopt) + (with-stream (s (open-command cmd `r@mopt`)) (get-jsons s))) -(defun command-put-jsons (cmd seq : flat-p) - (with-stream (s (open-command cmd "w")) +(defun command-put-jsons (cmd seq : flat-p mopt) + (with-stream (s (open-command cmd `w@mopt`)) (put-jsons seq s flat-p))) |