Skip to content

Commit

Permalink
See #111
Browse files Browse the repository at this point in the history
  • Loading branch information
borkdude committed Dec 4, 2024
1 parent ab826ff commit 3ce7852
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
:license {:name "Eclipse Public License 1.0"
:url "http://opensource.org/licenses/eclipse-1.0.php"}
:source-paths ["src"]
:dependencies [[org.clojure/clojure "1.9.0"]]
:dependencies [[org.clojure/clojure "1.10.0"]]
:plugins [[lein-codox "0.10.7"]
[lein-cloverage "1.2.2"]]
:codox {:output-path "gh-pages"}
Expand Down
8 changes: 8 additions & 0 deletions src/babashka/fs.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@
(throw (Exception. "Expected: one of :continue, :skip-subtree, :skip-siblings, :terminate.")))))

(defn- as-path
^Path [path]
(cond
(instance? Path path) path
(instance? URI path) (Path/of ^java.net.URI path)
(instance? File path) (.toPath ^java.io.File path)
:else (Path/of (str path) (make-array String 0))))

#_(defn- as-path
^Path [path]
(if (instance? Path path) path
(if (instance? URI path)
Expand Down

0 comments on commit 3ce7852

Please sign in to comment.