Welcome! Please see the About page for a little more info on how this works.

+2 votes
in Clojure by

java.nio.file.Path objects are largely equivalent to java.io.File. They represent a location in a (possibly-remote) filesystem.

Coercions in clojure.java.io don't recognize java.nio.file.Path. It would be nice if they did.

Prescreened: Alex Miller

Patch: CLJ-2333-1.patch

3 Answers

0 votes
by

Comment made by: ajoberstar

Added a patch that supports java.nio.file.Path in Coercions and IOFactory. There are more places (particularly the do-copy multimethod) that might warrant Path support, but this seemed like a good start.

Note, in case there's any confusion, I have signed the CA (June 17th), though my name is not yet on the site's list of CA signers.

0 votes
by

Comment made by: plexus

java.nio.file.Path was added in Java 7, which is perhaps why this change didn't make it in before. Clojure 1.10 will require Java 8, so perhaps it's time to consider this patch.

0 votes
by
Reference: https://clojure.atlassian.net/browse/CLJ-2333 (reported by mtnygard)
...