If I look here:
https://github.com/Raynes/fs/blob/master/src/me/raynes/fs.clj
I see vars such as "normalized"
(defn normalized
"Return normalized (canonical) file."
[path](.getCanonicalFile %28file path%29))
and this appears to be public. But if I put this in code I get "no such var". So I double-check myself. I look in project.clj and make sure fs is present:
:dependencies [[org.clojure/clojure "1.5.1"]
[dire "0.5.1"]
[org.clojure/tools.namespace "0.2.4"]
[lamina "0.5.0"]
[me.raynes/fs "1.4.4"]
[org.clojure/core.incubator "0.1.3"]
[clj-time "0.6.0"]]
I also have:
:disable-implicit-clean true
which has sometimes tripped me up in the past, so I carefully run:
lein clean
at the command line. In my own code I have a namespace defined with:
(:require
[me.raynes.fs :as fs]
and in my code I can use:
(fs/exists?)
but this:
(fs/normalized)
and this:
(fs/absolute)
gets me:
Caused by: java.lang.RuntimeException: No such var: fs/absolute, compiling:(tma_make_thumbnails/make_images.clj:56:22)
So I launch the repl and do this:
user> (require '[me.raynes.fs :as fs])
user> (ns-publics 'me.raynes.fs)
{walk #'me.raynes.fs/walk, copy #'me.raynes.fs/copy, readable? #'me.raynes.fs/readable?, create #'me.raynes.fs/create, writeable? #'me.raynes.fs/writeable?, file #'me.raynes.fs/file, split #'me.raynes.fs/split, chmod #'me.raynes.fs/chmod, find-files* #'me.raynes.fs/find-files_, mkdirs #'me.raynes.fs/mkdirs, directory? #'me.raynes.fs/directory?, delete #'me.raynes.fs/delete, tmpdir #'me.raynes.fs/tmpdir, child-of? #'me.raynes.fs/child-of?, sym-link #'me.raynes.fs/sym-link, ns-path #'me.raynes.fs/ns-path, parent #'me.raynes.fs/parent, temp-dir #'me.raynes.fs/temp-dir, file? #'me.raynes.fs/file?, absolute? #'me.raynes.fs/absolute?, mkdir #'me.raynes.fs/mkdir, with-mutable-cwd #'me.raynes.fs/with-mutable-cwd, exec #'me.raynes.fs/exec, link #'me.raynes.fs/link, list-dir #'me.raynes.fs/list-dir, glob #'me.raynes.fs/glob, home #'me.raynes.fs/home, name #'me.raynes.fs/name, parents #'me.raynes.fs/parents, find-files #'me.raynes.fs/find-files, exists? #'me.raynes.fs/exists?, executable? #'me.raynes.fs/executable?, chdir #'me.raynes.fs/chdir, copy-dir #'me.raynes.fs/copy-dir, rename #'me.raynes.fs/rename, temp-name #'me.raynes.fs/temp-name, *cwd_ #'me.raynes.fs/cwd, expand-home #'me.raynes.fs/expand-home, extension #'me.raynes.fs/extension, touch #'me.raynes.fs/touch, copy+ #'me.raynes.fs/copy+, delete-dir #'me.raynes.fs/delete-dir, size #'me.raynes.fs/size, path-ns #'me.raynes.fs/path-ns, split-ext #'me.raynes.fs/split-ext, with-cwd #'me.raynes.fs/with-cwd, hidden? #'me.raynes.fs/hidden?, temp-file #'me.raynes.fs/temp-file, normalized-path #'me.raynes.fs/normalized-path, absolute-path #'me.raynes.fs/absolute-path, unix-root #'me.raynes.fs/unix-root, iterate-dir #'me.raynes.fs/iterate-dir, base-name #'me.raynes.fs/base-name, link? #'me.raynes.fs/link?, mod-time #'me.raynes.fs/mod-time}
Sure enough, there is no "normalized" nor any "absolute".
Why do I see these functions here:
https://github.com/Raynes/fs/blob/master/src/me/raynes/fs.clj
but not in ns-publics?
I look here:
https://github.com/Raynes/fs/blob/master/project.clj
and see the version is:
me.raynes/fs "1.4.5"
but if I go here:
https://github.com/Raynes/fs
I see:
The Most Recent Release
With Leiningen:
[me.raynes/fs "1.4.4"]
so I upgrade to 1.4.5 and run "lein clean" and "lein uberjar" but I still get the same error:
Exception in thread "main" java.lang.RuntimeException: No such var: fs/normalized, compiling:(tma_make_thumbnails/make_images.clj:56:22)
Any suggestions?