Went through the doc,  you can pass the interface as is, it qualified the object
returned, no need for a class implementing the interface  here.

So 

(Files/readAttributes file  java.nio.file.attribute.BasicFileAttributes)

would do it. Of course you can shorten the above by importing the
interface as you did for the Files class.

Luc P.



> Hi,
> 
> I can't figure out a way to call the below method using Clojure - 
> Files.readAttributes(file, BasicFileAttributes.class) 
> because I don't know what to pass for the second parameter 
> BasicFileAttributes.class.
> 
> Also when I am calling the other method of the same class - 
> (Files/getAttribute (.toPath song) "title" LinkOption/NOFOLLOW_LINKS)
> I get the below exception -
> 
> java.nio.file.LinkOption cannot be cast to [Ljava.nio.file.LinkOption;
>   [Thrown class java.lang.ClassCastException]
> 
> Can you please point out what I am doing wrong? Thanks in advance.
> 
> Regards,
> Manoj.
> 
> -- 
> 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
--
Softaddicts<lprefonta...@softaddicts.ca> sent by ibisMail from my ipad!

-- 
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