Skip to content

Commit

Permalink
0.0.4 change some fns to be private
Browse files Browse the repository at this point in the history
  • Loading branch information
ahungry committed Sep 2, 2019
1 parent 280f10f commit 76157f8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion project.clj
@@ -1,4 +1,4 @@
(defproject ahungry/xdg-rc "0.0.3"
(defproject ahungry/xdg-rc "0.0.4"
:description "Library for working with XDG_CONFIG_HOME or other RC locations."
:url "http://github.com/ahungry/xdg-rc"
:license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
Expand Down
12 changes: 6 additions & 6 deletions src/xdg_rc/core.clj
Expand Up @@ -28,13 +28,13 @@
([s] (str (get-xdg-config-home) "/" s))
([s s2] (str (with-xdg s) "/" s2)))

(defn -exists [x]
(defn- -exists [x]
(.exists (clojure.java.io/file x)))

(defn exists [s]
(defn- exists [s]
(-exists (with-xdg s)))

(defn make-file-if-not-exists!
(defn- make-file-if-not-exists!
"Create a file unless it already exists."
([filename] (make-file-if-not-exists! filename ""))
([filename content]
Expand All @@ -51,7 +51,7 @@
(clojure.java.io/make-parents (with-xdg system ".gitkeep"))
(map (partial make-config! system) ms))

(defn slurp-if-exists [filename]
(defn- slurp-if-exists [filename]
(when (-exists filename)
(slurp filename)))

Expand Down Expand Up @@ -114,8 +114,8 @@
work properly if the chdir of POSIX is reset too quickly. Therefore this thread
will only reset the original chdir POSIX call 1 second after evaluation of the form.
For a more granular control, use the explicit function based variant `change-directory'
and `restore-directory'."
For a more granular control, use the explicit function based variant `change-directory`
and `restore-directory`."
[dir & r]
`(let [current-directory# (System/getProperty "user.dir")]
(try
Expand Down

0 comments on commit 76157f8

Please sign in to comment.