diff options
author | Stuart Sierra <mail@stuartsierra.com> | 2008-12-23 17:30:17 +0000 |
---|---|---|
committer | Stuart Sierra <mail@stuartsierra.com> | 2008-12-23 17:30:17 +0000 |
commit | 81dfc98f8b39fbfe44379e26ff541301523a3342 (patch) | |
tree | 2ead981ee2675f6a68835e57633d8445cc7867f8 | |
parent | b6fce0ce57fe3794057a52bcd1f24be00a24384e (diff) |
duck_streams.clj: added 'pwd'
-rw-r--r-- | src/clojure/contrib/duck_streams.clj | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/clojure/contrib/duck_streams.clj b/src/clojure/contrib/duck_streams.clj index d89f5bca..dc9778b4 100644 --- a/src/clojure/contrib/duck_streams.clj +++ b/src/clojure/contrib/duck_streams.clj @@ -180,3 +180,9 @@ [f content] (with-open [#^PrintWriter w (writer f)] (.print w content))) + +(defn pwd + "Returns current working directory as a String. (Like UNIX 'pwd'.) + Note: In Java, you cannot change the current working directory." + [] + (System/getProperty "user.dir")) |