Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ pom.xml
.classpath
.project
drake.log
.nrepl*
8 changes: 4 additions & 4 deletions src/drake/fs.clj
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@
(defn split-path
"Returns a tuple: prefix (possibly empty) and path."
[path]
(let [splt (split path #":" -1)]
(let [splt (split path #"://" -1)]
(if (= (count splt) 1)
["file" (first splt)]
[(first splt) (join ":" (rest splt))])))
[(first splt) (join "://" (rest splt))])))

(defn make-path
"The reverse of split-path"
[prefix path]
(str prefix (when (seq prefix) ":") path))
(str prefix (when (seq prefix) "://") path))

(defn path-fs
"Returns path's filesystem prefix (or an empty string if not specified)."
Expand Down Expand Up @@ -464,4 +464,4 @@

(defn newest-in
[path]
(pick-by-mod-time path -))
(pick-by-mod-time path -))