Add an option to read a message from a file.
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-09-12 21:55:48 +03:00
parent 63f55bbc50
commit 617dd34a23
2 changed files with 36 additions and 2 deletions
+18
View File
@@ -0,0 +1,18 @@
(ns cipher-analytical-machine.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))