add more clojure.java.io stuff (#64)
This commit is contained in:
parent
4b339e0e22
commit
b8436733a9
2 changed files with 15 additions and 5 deletions
13
src/babashka/impl/clojure/java/io.clj
Normal file
13
src/babashka/impl/clojure/java/io.clj
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
(ns babashka.impl.clojure.java.io
|
||||||
|
(:require [clojure.java.io :as io]))
|
||||||
|
|
||||||
|
(def io-bindings
|
||||||
|
{'io/as-relative-path io/as-relative-path
|
||||||
|
'io/copy io/copy
|
||||||
|
'io/delete-file io/delete-file
|
||||||
|
'io/file io/file
|
||||||
|
'io/input-stream io/input-stream
|
||||||
|
'io/make-parents io/make-parents
|
||||||
|
'io/output-stream io/output-stream
|
||||||
|
'io/reader io/reader
|
||||||
|
'io/writer io/writer})
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
[babashka.impl.Thread :refer [thread-bindings]]
|
[babashka.impl.Thread :refer [thread-bindings]]
|
||||||
[babashka.impl.async :refer [async-bindings]]
|
[babashka.impl.async :refer [async-bindings]]
|
||||||
[babashka.impl.clojure.core :refer [core-bindings]]
|
[babashka.impl.clojure.core :refer [core-bindings]]
|
||||||
|
[babashka.impl.clojure.java.io :refer [io-bindings]]
|
||||||
[babashka.impl.clojure.stacktrace :refer [print-stack-trace]]
|
[babashka.impl.clojure.stacktrace :refer [print-stack-trace]]
|
||||||
[babashka.impl.conch :refer [conch-bindings]]
|
[babashka.impl.conch :refer [conch-bindings]]
|
||||||
[babashka.impl.pipe-signal-handler :refer [handle-pipe! pipe-signal-received?]]
|
[babashka.impl.pipe-signal-handler :refer [handle-pipe! pipe-signal-received?]]
|
||||||
|
|
@ -142,15 +143,11 @@ Everything after that is bound to *command-line-args*."))
|
||||||
(merge {'shell/sh shell/sh
|
(merge {'shell/sh shell/sh
|
||||||
'namespace namespace
|
'namespace namespace
|
||||||
;; clojure.java.io
|
;; clojure.java.io
|
||||||
'io/as-relative-path io/as-relative-path
|
|
||||||
'io/copy io/copy
|
|
||||||
'io/delete-file io/delete-file
|
|
||||||
'io/file io/file
|
|
||||||
'io/reader io/reader
|
|
||||||
'edn/read-string edn/read-string
|
'edn/read-string edn/read-string
|
||||||
'net/wait-for-it net/wait-for-it
|
'net/wait-for-it net/wait-for-it
|
||||||
'sig/pipe-signal-received? pipe-signal-received?}
|
'sig/pipe-signal-received? pipe-signal-received?}
|
||||||
core-bindings
|
core-bindings
|
||||||
|
io-bindings
|
||||||
system-bindings
|
system-bindings
|
||||||
file-bindings
|
file-bindings
|
||||||
thread-bindings
|
thread-bindings
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue