(rontolisp) docs
← リファレンス

入出力

eval IO 層上のファイル入口です。インタプリタと JVM で動きます。wasm では open/with-open-file と同じく、パスを含む --dir プリオープンが必要です。なければ open が file-error を通知します。read-string と read は、spit が書いた内容を含む データの読み戻しを、すべてのバックエンドで行います。format は Clojure 記法の引数で Java 形式の文字列を描画します。

NameExampleResult
spit(spit path "a\n")nil
slurp(slurp path)"a\n"
line-seq(line-seq path-or-reader)("a")
clojure.java.io/reader(jio/reader path)a reader
read-string(read-string "[1 :k]")[1 :k]
read(read (java.io.PushbackReader. (jio/reader path)))the first datum
format(format "%s=%d" :a 5)":a=5"
with-open(with-open [] :ok):ok
with-out-str(with-out-str (print 1))"1"
with-in-str(with-in-str "a\nb" (read-line))"a"
read-line(read-line)the next line of *in*
print-str(print-str 1 "a")"1 a"
prn-str(prn-str 1 "a")"1 \"a\"\n"
println-str(println-str 1 "a")"1 a\n"