Howdy all, I'm trying to call the createFile method from the Path class specified here: http://java.sun.com/javase/7/docs/api/java/nio/file/Path.html
The following text: The following code snippet creates a file with default attributes: Path file = ...; try { file.createFile(); //Create the empty file with default permissions, etc. } catch (FileAlreadyExists x) { System.err.format("file named %s already exists%n", file); } catch (IOException x) { //Some other sort of failure, such as permissions. System.err.format("createFile error: %s%n", x); } from: http://java.sun.com/docs/books/tutorial/essential/io/file.html describes how you can call createFile without any parameters even though the method signature in the api only has one version of the method taking a FileAttribute object. When I try and call createFile from clojure: (.createFile path) I get an exception that there is no field named createFile. This makes perfect sense to me since there is no public method with an explicit signature taking zero args, so clojure is looking for a field. However, based on a test program in java and the tutorial text, the method works great without any parameters. Is there any way to force clojure to try and call the method? Passing nil as an argument gets a null pointer exception. I could create a FileAttribute object easily if I was running on a Posix filesystem, but I'd like this to work on DOS as well. Thanks! Carl --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---