Skip to content

Instantly share code, notes, and snippets.

@kyleburton
Created May 3, 2009 17:55
Show Gist options
  • Save kyleburton/106079 to your computer and use it in GitHub Desktop.
Save kyleburton/106079 to your computer and use it in GitHub Desktop.
clojure ftp example
(ns tiger
(:import ( org.apache.commons.net.ftp FTP FTPClient))
(:require [com.github.kyleburton.sandbox.ftp :as ftp])
(:use [ clojure.contrib.str-utils :as str]))
(def *tiger-ftp-url* "ftp://anonymous:user%[email protected]/geo/tiger/TIGER2008/")
(ftp/list-all *tiger-ftp-url*)
(ftp/list-files *tiger-ftp-url*)
(ftp/list-directories *tiger-ftp-url*)
(ftp/retrieve-file *tiger-ftp-url* "tl_2008_us_nectadiv.zip" "/tmp/tl_2008_us_nectadiv.zip")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment