BasicFileAttributes is an interface. You need to pass a class that implements this interface. I am not yet familiar with java 7, just the way the javadoc is organized gives me a headache but I am trying to find a decent answer.
As for the error, the getAttributes expects a variable length argument for the options. which from Clojure can be created as an array of type LinkOption. Look at into-array, you will be able to create it using: (into-array java.nio.file.LinkOption [ java.nio.file.LinkOption/NOFOLLOW]) of the top of my head, Clojure does not run on my iPad yet :) Luc > 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 [email protected] > Note that posts from new members are moderated - please be patient with your > first post. > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en -- Softaddicts<[email protected]> 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 [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en
