Skip to content

Commit

Permalink
Rename *-path vars to just * and made sure they return File objects.
Browse files Browse the repository at this point in the history
  • Loading branch information
Raynes committed Nov 15, 2013
1 parent ce49500 commit 8fadbde
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/me/raynes/fs.clj
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,13 @@
[path]
(predicate exists (file path)))

(defn absolute-path
"Return absolute path."
(defn absolute
"Return absolute file."
[path]
(.getAbsolutePath (file path)))
(.getAbsoluteFile (file path)))

(defn normalized-path
"Return normalized (canonical) path."
(defn normalized
"Return normalized (canonical) file."
[path]
(.getCanonicalFile (file path)))

Expand Down
4 changes: 2 additions & 2 deletions test/me/raynes/core_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@
(delete tmp)))

(fact
(absolute-path "foo") => (str (io/file *cwd* "foo")))
(absolute "foo") => (io/file *cwd* "foo"))

(fact
(normalized-path ".") => *cwd*)
(normalized ".") => *cwd*)

(fact
(base-name "foo/bar") => "bar"
Expand Down

2 comments on commit 8fadbde

@csummers
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, this API name change caught me off guard for a "patch" release (assuming semantic versioning).

Not a big problem, but it may affect others as well.

Thanks for the great library.

@Raynes
Copy link
Owner Author

@Raynes Raynes commented on 8fadbde Jun 16, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was entirely accidental that this change snuck into a patch release. I forgot there were recent breaking changes. Sincerest apologies, but not a ton I can do about it now. :(

Please sign in to comment.