ClojureDocs

Nav

Namespaces

load

clojure.core

Available since 1.0 (source)
  • (load & paths)
Loads Clojure code from resources in classpath. A path is interpreted as
classpath-relative if it begins with a slash or relative to the root
directory for the current namespace otherwise.
2 Examples
;; file located at src/address_book/core.clj and current namespace
;; located at root of the classpath, such as "user".

(load "address_book/core")
;; Loading from root of the classpath, such as user namespace

(ns user)
(load "/clojure/set")
;; nil

;; Loading "clojure/xml.clj" from a relative location in the classpath 
;; does not want the "/"

(ns clojure.set)
(load "xml")
;; nil
See Also

Sequentially read and evaluate the set of forms contained in the file.

Added by gstamp

Defaults to true (or value specified by system property, see below) ***This setting implies that t...

Added by jafingerhut

Sequentially read and evaluate the set of forms contained in the string

Added by witek
0 Notes
No notes for load