On Mar 22, 3:29 am, siyu798 <siyu...@gmail.com> wrote:
> Miki,
> Thanks for the quick response, but I'm not just looking for a fix for the
> testcase, I'm looking for the dirname function to return the same output
> regardless of the machine that the code is running on, eg
>
> (dirname "/a/b/c") should return "/a/b/" on both win and unix

You can write such a function yourself. Irrespective of the platform,
Java works fine with '/' as a separator in the filename. The function
below first converts all '\' to '/' and then splits on '/' to maintain
platform-independence:

https://bitbucket.org/kumarshantanu/clj-miscutil/src/0068da5842c9/src/main/clj/org/bituf/clj_miscutil.clj#cl-580

Btw, this is not in the stable version yet - will be available in the
next GA. (Sorry for the plug, that was not the intention. :-))

Regards,
Shantanu

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to