Thank you, that was the problem.
I wonder if Stuart should change this line:
(defn clojure-source? [file] (.endsWith (.toString file) ".clj" ))
to this:
(defn clojure-source? [file] (and (.isFile file) (.endsWith (.toString
file) ".clj" )))
just to make sure directories like "myproj.clj" don't
Robert Campbell napisał(a):
> I'm trying to write a file scanner very similar to the one on page 131
> of Stuart's book:
>
> (ns user
> (:use [clojure.contrib.duck-streams :only [reader]]))
>
> (defn scan [dir]
> (for [file (file-seq dir)]
> (with-open [rdr (reader file)]
> (count (
Forgot to mention: running Clojure 1.0.0- and Clojure-Contrib
1.0-SNAPSHOT according to the pom..
On Thu, Nov 26, 2009 at 7:38 AM, Robert Campbell wrote:
> I'm trying to write a file scanner very similar to the one on page 131
> of Stuart's book:
>
> (ns user
> (:use [clojure.contrib.duck-strea