On 14 May 2010 13:50, Stuart Halloway <stuart.hallo...@gmail.com> wrote: >> So if program runs from a particular directory and references files as >> file:///some/file, then if someone can create a directory called file: >> in that directory with some/file inside that, the program will >> suddenly try to access the wrong thing? Seems suspicious to me. > > Two points: > > (1) This is not what the code does. If it looks like a URL, it will be > treated like a URL, period. The io fns will simply refuse to open a file > whose name looks like a URL.
OK, thanks for clarifying. Sorry for my confusion :) > (2) The purpose of the IO helper fns is not to provide the "one true way" to > get things. Their purpose is convenience. There are *already* easy ways to > get things, and to be exact about interpretation. These even play nice with > the io functions: > > ; convenient > (reader "blah") > > ; URL or die > (reader (URL. "blah")) > > ; File or die > (reader (File. "blah")) OK, then I retract my complaints and thanks for these examples. -- Michael Wood <esiot...@gmail.com> -- 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