Files
cipher-analytical-machine/src/cipher_analytical_machine/cli/file.clj
T
KKlochko 4d7e9da1d1
continuous-integration/drone/push Build is passing
Refactor the project structure.
2023-10-11 21:12:10 +03:00

22 lines
439 B
Clojure

(ns cipher-analytical-machine.cli.file
(:require [clojure.java.io :as io])
(:gen-class))
(defn is-file-exists?
"Checks that a file is exists"
[file-path]
(-> (io/file file-path)
(.exists)))
(defn is-file-not-exists?
"Checks that a file is not exists"
[file-path]
(not (is-file-exists? file-path)))
(defn read-file [file-path]
(slurp file-path))
(defn write-file [file-path content]
(spit file-path content))